Configure HTML/JavaScript

Showing posts with label unix file edit in windows. Show all posts
Showing posts with label unix file edit in windows. Show all posts

Monday, November 26, 2012

^M: not found error in unix

^M: not found error in unix

 I was executing a shell script file through the nohup command. while executing the file i got the ^M: not found error in unix command prompt.

Then i started searching why i am getting this error. after making several googling, i got to know that this is due to i created this shell script file in windows (eclipse) OS. 

Normally when we create any file in windows and move/upload it to unix it append ^M in every line in the unix platform. it causes the error. now you need to remove these ^M character from the  shell script to work it properly. You can do that i several ways

1. opening the script file VI editor and manually removing these extra charactors
2. using dos2unix command
3.....