|
: bad interpreter: No such file or directory |
|
|
: bad interpreter: No such file or directory
The above error is reported when trying to execute some script at the Unix/Linux shell.
If the file has been edited on a Windows machine it can sometimes Add CR/LF (VM) characters on the end of each line, so #!/bin/sh becomes #!/bin/shVM and as the ctrl-v/ctrl-m characters are special, and hidden by default on most editors,
it can create a really hard to find problem. To remove the extra CR
characters that UNIXish machines don't like, simply use the dos2unix
command:
* []dos2unix <infile> <outfile>
If your OS doesn't have dos2unix, then you can use:
* []cat <infile> | tr -d ``\r'' > <outfile>
|