Thursday, March 18, 2010

Remove Ctrl M characters in vi

To remove windows end of line characters, Ctrl M characters in vi

1) open the file in vi
vi
2) Type the following
To get ^M, press ctrl key on your keyboard and press v and m

:%s/^M//g

3) dont forget to save the file with :wq!

Enjoy.

No comments: