Whenever I try to run my shell script, I'm getting an error under 4 different if tests.
script.sh 45: script.sh: : Permission denied
script.sh 52: script.sh: : Permission denied
script.sh 59: script.sh: : Permission denied
script.sh 324: script.sh: : Permission denied
I did a chmod 777 on my script so everyone has permissions to it. The script is run like this:
./script fileToUse
Here is what those lines where it gave the error message looks like:
if ( "$VAR" == "Condition_1" )
then
do stuff
elif ( "$VAR" == "Condition_2" )
then
do stuff
elif ( "$VAR" == "Condition_3" )
then
do stuff
else
do stuff
fi
And the line of 324 looks like this:
if ( "$flagIsSet" -eq 0 )
then
do stuff
fi
Any idea why I might be getting this error message and what it means?