If you’re getting the above errors, when you try to run a .sh or similar [I've seen it with perl scripts too] this is will be due to the file being in dos [windows] format, and probably written in notepad or similar.
If you need to get this into unix format, it can be pretty painless, just run the command
dos2unix filename
dos2unix should be available under most releases of linux. Happy coding.





