From owner-freebsd-questions@FreeBSD.ORG Fri May 5 13:45:47 2006 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D7B9616A411 for ; Fri, 5 May 2006 13:45:47 +0000 (UTC) (envelope-from keramida@ceid.upatras.gr) Received: from igloo.linux.gr (igloo.linux.gr [62.1.205.36]) by mx1.FreeBSD.org (Postfix) with ESMTP id 158E143D58 for ; Fri, 5 May 2006 13:45:44 +0000 (GMT) (envelope-from keramida@ceid.upatras.gr) Received: from gothmog.pc (aris.bedc.ondsl.gr [62.103.39.226]) (authenticated bits=128) by igloo.linux.gr (8.13.6/8.13.6/Debian-1) with ESMTP id k45DjLkS014817 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Fri, 5 May 2006 16:45:23 +0300 Received: from gothmog.pc (gothmog [127.0.0.1]) by gothmog.pc (8.13.6/8.13.6) with ESMTP id k45DjXuP029489; Fri, 5 May 2006 16:45:33 +0300 (EEST) (envelope-from keramida@ceid.upatras.gr) Received: (from giorgos@localhost) by gothmog.pc (8.13.6/8.13.6/Submit) id k45DjWWI029488; Fri, 5 May 2006 16:45:32 +0300 (EEST) (envelope-from keramida@ceid.upatras.gr) Date: Fri, 5 May 2006 16:45:32 +0300 From: Giorgos Keramidas To: Aguiar Magalhaes Message-ID: <20060505134532.GA29212@gothmog.pc> References: <20060505131202.44990.qmail@web31608.mail.mud.yahoo.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20060505131202.44990.qmail@web31608.mail.mud.yahoo.com> X-Hellug-MailScanner: Found to be clean X-Hellug-MailScanner-SpamCheck: not spam, SpamAssassin (score=-3.398, required 5, autolearn=not spam, ALL_TRUSTED -1.80, AWL 0.80, BAYES_00 -2.60, DNS_FROM_RFC_ABUSE 0.20) X-Hellug-MailScanner-From: keramida@ceid.upatras.gr X-Spam-Status: No Cc: freebsd-questions@freebsd.org Subject: Re: Substitute command on vi X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 May 2006 13:45:48 -0000 On 2006-05-05 10:12, Aguiar Magalhaes 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.