skip to main
|
skip to sidebar
Hello World
For thoughts, for sharing...
Friday, October 16, 2009
how to remove ^M from a Unix file
^M is DOS line break charater which shows up in unix files when uploaded from a windows file system in ascii format.
Under vi, and enter
:s/(ctrl-v)(ctrl-m)//g
Note, we need to press (Ctrl+v) and (Ctrl+m) to get ^M, instead of directly input these two characters. Seems we can also try
dos2unix
command.
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
My Links
Chinese Politics and Political Economy
Financial Times
WSJ
谢国忠
Michael Pettis
Marc Faber
Man in Central
Blog Archive
►
2013
(1)
►
June
(1)
►
2011
(18)
►
October
(1)
►
September
(3)
►
August
(1)
►
June
(1)
►
May
(1)
►
February
(1)
►
January
(10)
►
2010
(8)
►
December
(1)
►
October
(1)
►
August
(1)
►
March
(1)
►
February
(1)
►
January
(3)
▼
2009
(26)
►
December
(5)
►
November
(17)
▼
October
(4)
some quotes from "The Godfather I&II"
All Of A Sudden
The Present - Author Unkown
how to remove ^M from a Unix file
►
2008
(3)
►
March
(1)
►
January
(2)
►
2007
(20)
►
December
(4)
►
November
(14)
►
October
(1)
►
February
(1)
Programming
Python Tutorial
C/C++ Reference
Tech Tips
Tech-Bits - vi
Statistics
No comments:
Post a Comment