Bash script and /bin/bash^M: bad interpreter: No such file or directory Run following command in terminal sed -i -e 's/\r$//' scriptname.sh