if you cannot run a script called yourScript.sh run the following command in terminal sed -i -e 's/ $//' yourScript.sh Then your script should run