Posts Tagged ‘^M’

How to remove ^M characters using VI

Sunday, June 29th, 2008

This is a quick tip for Linux/UNIX users who are familiar with the vi editor. Here’s how to remove those annoying ^M characters, that show up at the end of lines, in files that were created or modified in DOS/Windows. Open the file using vi, and type: :%s/[CTRL+v][CTRL+m]//g The [CTRL+v][CTRL+m] means holding down the CTRL [...]