0

I am getting syntax error with (( )) brackets,

 read -p "enter the file name: " file if (( -e "$file" )) then echo " $file exit" else echo " $file not exit " fi 
2
  • 1
    (( )) is only for math. [[ ]] is the general extended test syntax. Commented Dec 1, 2020 at 16:35
  • if [ -f "$file" ] Commented Dec 1, 2020 at 16:35

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.