20071126

Remove all "^M" characters from a file using vi.

To remove all "^M" characters from a file, open it in vi and use this command:
:%s/^M//g

The "^M" in the above line has to be typed in by pressing CTRL+v and then CTRL+M.

Also by :%s/\r\(\n\)/\1/g from here.

Δεν υπάρχουν σχόλια:

eggs.in.art (my non-technical blog)