From owner-freebsd-questions@FreeBSD.ORG Sun Jan 25 07:18:18 2004 Return-Path: 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 DD12616A4D8 for ; Sun, 25 Jan 2004 07:18:18 -0800 (PST) Received: from mta1.tpinternet.pl (outgoing.tpinternet.pl [193.110.120.20]) by mx1.FreeBSD.org (Postfix) with ESMTP id 21D5843D5A for ; Sun, 25 Jan 2004 07:18:17 -0800 (PST) (envelope-from zaphod@neostrada.pl) Received: from rc140.neoplus.adsl.tpnet.pl (rc140.neoplus.adsl.tpnet.pl [80.50.76.140]) by mta1.tpinternet.pl (Postfix) with ESMTP id 7D7192AEB for ; Sun, 25 Jan 2004 16:18:06 +0100 (CET) From: Bernard El-Hagin To: freebsd-questions@freebsd.org Date: Sun, 25 Jan 2004 16:15:09 +0100 Message-ID: References: <200401250152.46526.kstewart@owt.com> In-Reply-To: <200401250152.46526.kstewart@owt.com> X-Mailer: Forte Agent 1.93/32.576 English (American) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Subject: Re: how to get rid of ^M character using vi X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Jan 2004 15:18:19 -0000 Kent Stewart wrote: >On Sunday 25 January 2004 01:43 am, marlon corleone wrote: >> how do i get rid of this annoying character ^M using vi, in pico i >> used the arguments '-w' >> but what about in vi? > > >starting on the 1st line type >:.,$s/vm// > >The .,$ tells it to process from the current line to the last one. If you're doing this for the whole file it's faster to use % :%s/vm// It's even faster to use :se ff=3Dunix but that assumes we're talking about Vim, not Vi. --=20 Cheers, Bernard