How to delete ^M characters using VI

Tired of seeing ^M characters in your config files? Try this nice little VI trick.

Open the file and type:

 :%s/^M//g

To enter the ^M, press the control key then keys V and M

Leave a Reply

Your email address will not be published. Required fields are marked *