2013 January

How to remove ^M characters at the end of lines in Vi from files in Linux?

Files created in windows when moved to linux will have ^M character at the end of lines when you open the files in Vi editor.

To remove the strange characters open the file in Vi editor and type

:%s/.$// 

Continue Reading…

Share it onShare on FacebookShare on Google+Tweet about this on TwitterShare on LinkedIn
Kurinchi Calendar
January 2013
M T W T F S S
« Dec   Feb »
 123456
78910111213
14151617181920
21222324252627
28293031