Edit file on Windows, shows ^M on each line on Linux
Joseph Hall
joseph at thatworks.com
Fri Apr 13 09:42:56 MDT 2007
Window and DOS use <CR><LF> as its end of line marker, whereas Unix
and Linux only use <LF>. When you open a Windows file in something
such as vi in Linux, you get ^M at the end, which represents the <CR>.
You can use dos2unix to stip the ^M from your files in Unix and Linux:
$ dos2unix filename.ext
Keep in mind that it will replace the original file with the converted file.
--
Joseph
http://blog.josephhall.com/
More information about the PLUG
mailing list