: bad interpreter: No such file or directory

Writing by on Monday, 4 of August , 2008 at 11:14 am

Running a bash script, gives the following error:

: bad interpreter: No such file or directory

The carriage return was not properly converted to *nix format. (maybe the file was created in Windows)
To fix it run the following.

$ dos2unix filename — convert to *nix format

To copy the file to Windows run the following.

$ unix2dos filename — convert to Windows/DOS format

Leave a comment

Category: Linux

No Comments

No comments yet.

Leave a comment

You must be logged in to post a comment.

Shivdev Kalambi's Blog

Shivdev Kalambi is a Software Development Manager, previously a Principal Software Engineer at ArcSight/HP. With over 16 years' experience in software development, he's worked on several technologies and played different roles and contributed to all phases of projects. Non-tech activies include Ping-pong, Rock Climbing and Yoga at PG, Golf, Skiing, Swimming & a beer enthusiast.