Archive for the ‘Uncategorized’ Category

How to remove ^M character with VI

May 5, 2010

There is a much easier way.

In vi, execute this –

:%s/^M//g

To get the ^M hold the control key, press V then M (Both while holding the control key) and the ^M will appear. This will find all occurrences and replace them with nothing.

i.e.

:%s/[ctrlkey+v+m]//g

Hope this helps

Advertisements