Some times when you take a file from a DOS/Windows system and move it to a Linux or Unix system you'll have problems with the dreaded ^M character. This happened recently when I moved an Ant script from a Windows system to my Mac OS X system. When I tried to run the shell script under the Mac Terminal I got this error message:
: bad interpreter: No such file or directory
I couldn't figure out what the message meant at first, but finally it hit me: the dreaded ^M problem. Sure enough, I opened the file in the vim editor, like this: