Hi,
I've found out (after trying almost everything else I could coinceive), that if I
make a BASH script with DOS/WIN line endings instead of UNIX line endings, when I try to
run that script I get the error message:
: bad interpreter: No such file or directory
this is rather useless as error message: I understand this is because after reading the
first CR character, BASH reads the LF character and (maybe?) try to exec it and then shows
this error.
So, my proposal/feature-request is:
1) make a better error message when executing scripts with CRLF line endings (maybe using
a simple heuristics to check if a script file has CRLF endings)
2) auto-convert internally scripts with DOS line endings to UNIX line endings
This was really a problem for me, specially because I have to copy & edit files among unix
& win machines. Obviously, now that I've found the cause of the error, I just need to use
"dos2unix" to fix the problem, but I think that a better error message / handling of DOS
line endings could help a lot of other people... ;)
Francesco
_______________________________________________
Bug-bash mailing list
Bug-bash@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-bash