I'm trying to execute a bash script (git-ftp) but I can't seem to do it. This is what happens:
[trusktr@rocketship ~]$ ~/scripts/git-ftp
: No such file or directory
The file has permissions 755.
This is the contents of the script: http://pastie.org/3567556
Why am I getting this error? What can I do to fix the problem?
I have seen this error if the script has windows line endings instead of unix line endings. Try running
dos2unix
on the script and see if you get the same error.Is there a
#!
(hash bang) line in the script, and does the pathname resolve?If the script is running, it may be something in the script. Add this command to the top of the script, before any other command (but of course after the hash bang, if there is one):