Home arrow Wiki arrow : bad interpreter: No such file or directory
Main Menu
Home
Help Docs
Newbies
Corporates
Gnu/Linux Distros
Programming
Databases
Links
Search
Regular
News
Interviews
Aaj Ka Tip
Aaj Ka Command
Community
Blogs
Wiki
Forums
Services
Free Software

: bad interpreter: No such file or directory Print E-mail
: 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>


< Previous   Next >



gnulinuxclub
Join Us
About Us
Contact Us
Support Us
Acknowlegdement
Login(only for dev.)

Royalty Free Images

O'Reilly User Group discount!




Powered By GIMP GIMP
Contact Webmaster Copyleft 2011 gnulinuxclub.org