Randomly when you write a script and change something in it using Windows Notepad/Wordpad and didn't run the dos2unix command, you will get a ^M after each line of code. To remove all the ^M's at once enter the following:
vi <your file name>
When you are in the file issue a colon )then enter the following like this
:g/^M/s// /g
To get the ^M use the control + V and m simultainously.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.