Substitute command on vi

Riemer Palstra riemer at palstra.com
Fri May 5 13:21:59 UTC 2006


On Fri, May 05, 2006 at 10:12:02AM -0300, Aguiar Magalhaes wrote:
> I need to substitute a lot of characters ^M (ctrl+M)
> at the end of each line in my file.

You might wanna give dos2unix a try: /usr/local/bin/dos2unix

> The command :%s/^M//g insn't have success.

Is this a shift+6 M, or a ctrl+V ctrl+M? The last one should work.

-- 
Riemer Palstra		     		      Amsterdam, The Netherlands
riemer at palstra.com				 http://www.palstra.com/


More information about the freebsd-questions mailing list