remove ^M

por | 24 mayo, 2011

in vi do the following:

:g/^M/s/// (the ctrl-m has to be entered with the key strokes «ctrl-v followed by ctrl-m». That’s teh only way it works!

Or use sed to do it:
sed ‘s(ctrl v ctrl m)g//g’ old.file > new.file

tr -d ‘\r’ new.file

Categoría: Nix