Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 5 May 2006 16:45:32 +0300
From:      Giorgos Keramidas <keramida@ceid.upatras.gr>
To:        Aguiar Magalhaes <magalhj@yahoo.com.br>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: Substitute command on vi
Message-ID:  <20060505134532.GA29212@gothmog.pc>
In-Reply-To: <20060505131202.44990.qmail@web31608.mail.mud.yahoo.com>
References:  <20060505131202.44990.qmail@web31608.mail.mud.yahoo.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On 2006-05-05 10:12, Aguiar Magalhaes <magalhj@yahoo.com.br> wrote:
> Hi list,
>
> I need to substitute a lot of characters ^M (ctrl+M)
> at the end of each line in my file.
>
> The command :%s/^M//g insn't have success.

The command looks fine, except for a tiny detail:

Make sure you use ^V ^M to insert a *literal* ^M character in the
match pattern, instead of two different characters '^' and 'M'.
Then it should work.




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20060505134532.GA29212>