Why wont this script run??

Gordon Messmer yinyang at eburg.com
Fri Oct 14 08:42:42 UTC 2005


Søren Neigaard wrote:
> --- SCRIPT ---
> #!/bin/bash
...
> : bad interpreter: No such file or directory
> 
> Im no shell programmer, so i have no clue... Any ideas folks?

I know the script problem's been fixed, so... TRIVIA:
That's always an indication of DOS linefeeds in the script file.  What's 
actually being printed to the terminal is something like:

bash: ./script.sh: /bin/bash\r: bad interpreter: No such file or directory

The '\r' character is a carriage return, which causes the cursor to move 
back to the beginning of the line.  All of the characters after the '\r' 
are then printed over the top of those that were printed first.




More information about the fedora-list mailing list