From owner-freebsd-questions@FreeBSD.ORG Sun Jan 25 08:27:30 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 E842316A4CE for ; Sun, 25 Jan 2004 08:27:30 -0800 (PST) Received: from pegasus.wooledge.org (wooledge.org [209.142.155.49]) by mx1.FreeBSD.org (Postfix) with SMTP id 3B66C43D1F for ; Sun, 25 Jan 2004 08:27:26 -0800 (PST) (envelope-from greg@wooledge.org) Received: (qmail 31397 invoked from network); 25 Jan 2004 16:27:23 -0000 Received: from unknown (HELO griffon.wooledge.org) (192.168.2.5) by 192.168.2.1 with SMTP; 25 Jan 2004 16:27:23 -0000 Received: (qmail 26461 invoked by uid 1000); 25 Jan 2004 16:27:23 -0000 Date: Sun, 25 Jan 2004 11:27:23 -0500 From: Greg Wooledge To: freebsd-questions@freebsd.org, misc@openbsd.org Message-ID: <20040125162723.GQ672@griffon> Mail-Followup-To: freebsd-questions@freebsd.org, misc@openbsd.org References: <20040125151753.GA1798@gandalf.welch.net> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="5LiOUhUlsRX0HDkW" Content-Disposition: inline In-Reply-To: <20040125151753.GA1798@gandalf.welch.net> X-Operating-System: Linux 2.4.24 X-www.distributed.net: 1857 packets (1857.00 stats units) [5,170,783 keys/s] User-Agent: Mutt/1.5.4i 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 16:27:31 -0000 --5LiOUhUlsRX0HDkW Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable If *every* line ends with ^M (which is almost always going to be the case, if the file has been produced on a DOS/Windows system), then you can just use this: :%s/.$// to delete the last character of each line. This has an obvious downside, but the advantages are that it's easier to type and to read. --=20 Greg Wooledge | "Truth belongs to everybody." greg@wooledge.org | - The Red Hot Chili Peppers http://wooledge.org/~greg/ | --5LiOUhUlsRX0HDkW Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (GNU/Linux) iD8DBQFAE+5rkAkqAYpL9t8RAnBDAKCSys/NasLgDNhfgIlMm+nBlQSDfwCgjrdo /Ric5PWc4xhRl1vnsIQqrB8= =wAJH -----END PGP SIGNATURE----- --5LiOUhUlsRX0HDkW--