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 Find centralized, trusted content and collaborate around the technologies you use most.
Learn more about CollectivesStack Internal
Knowledge at work
Bring the best of human thought and AI automation together at your work.
Explore Stack InternalI 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
(( ))is only for math.[[ ]]is the general extended test syntax.if [ -f "$file" ]