How to remove ^M character
philip.payne at uk.mci.com
Fri Aug 1 02:42:53 PDT 2003
> I ftp'd a file from windows to freebsd....not its every line
> has ^M at its
> Is there some command in vi (or some way) by whcih ^M can be removed.
At the vi command line
:1,$:s/<here type ctrl-v then ctrl-M to get the ^M control character//
Basically it's just saying from line 1 to end($) search for ctrl-M and
replace with nothing.
Get this all the time when working with people who write router configs on
their windblows machines and send them to me.
More information about the freebsd-questions