Monday, February 01, 2010

Removing ^M characters (windows line endings) using VIM editor

Removing \r\n (windows line endings) in VIM editor

In vi, you can remove the carriage return ( ^M ) characters with the following command:

:1,$s/^M//g


Note: To input the ^M character, press Ctrl-v , then press Enter or return.

No comments: