Tag Archives: shell script

^M: not found

I was preparing shell script file to add it to cron job on Sun Solaris. The script was already added to cron job. I just need some extra few things. So, I downloaded it to my desktop which in win xp. Opened it with wordpad added the required lines and uploaded to the server. To test it I run the script file via ‘ sh test.sh ‘. Then it told me ” test.sh ^M: not found “.

Well, it was totally unexpected. So, I googled it and found ‘^M’ is a DOS carriage return. 😦

Windows did it to me. So, the best idea is edit the file in VI editor. So, I did it.

Advertisements