Wednesday, March 14, 2012

Bad Interpreter - No such file or directory

I ran into an issue with a shell script not functioning, getting the following error:

bad interpreter: no such file or directory

I verified that the shell was located at /bin/sh.  I then remembered that a colleague of mine made some changes to the script a few days earlier...on Windows...then moved it back.  Hmm.  Linebreaks ended up being the issue.

I ran

dos2unix filename

and the scripts ran just fine.

Hope that helps someone.

No comments:

Post a Comment