From owner-freebsd-questions Sun Jan 10 23:11:17 1999 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id XAA18409 for freebsd-questions-outgoing; Sun, 10 Jan 1999 23:11:17 -0800 (PST) (envelope-from owner-freebsd-questions@FreeBSD.ORG) Received: from biceps.gymnet.com (biceps.gymnet.com [204.216.82.50]) by hub.freebsd.org (8.8.8/8.8.8) with SMTP id XAA18400 for ; Sun, 10 Jan 1999 23:11:15 -0800 (PST) (envelope-from rwl@gymnet.com) Message-Id: <199901110711.XAA18400@hub.freebsd.org> Received: (qmail 518 invoked from network); 11 Jan 1999 07:10:06 -0000 Received: from triceps.gymnet.com (HELO triceps) (204.216.82.51) by biceps.gymnet.com with SMTP; 11 Jan 1999 07:10:06 -0000 From: "Robert Luce" To: "charon@freethought.org" Cc: "freebsd-questions@freebsd.org" Date: Sun, 10 Jan 1999 23:10:37 -0800 Reply-To: "Robert Luce" X-Mailer: PMMail 98 Professional (2.01.1600) For Windows 98 (4.10.1998) MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Subject: Re: replacing ^M in vi Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by hub.freebsd.org id XAA18402 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG %s///g means press control-v means hit the enter key or press control-m On Sun, 10 Jan 1999 22:59:10 -0800, charon@freethought.org wrote: >Whenever I save a plain text file in WinNT and open it in FreeBSD, at the >end of every line is a "^M". How do I get rid of these? I tried writing a >little C++ program to copy all text except "^M" to another file, but it >doesn't work because C++ treats the ^ and the M as different characters, >whereas vi treats them as _one_ character. After searching the mailing >list archives, I came up with the syntax ":%s/stuff/other stuff/g" as the >oh-so-intuitive replace command in vi, and I tried it, but to no avail (it >says "no match found"). Any suggestions? Thanks, > > > > Charon@freethought.org > http://members.home.net/tuathadedanann/ > > alt.sex.fetish.hamster.duct-tape > >To Unsubscribe: send mail to majordomo@FreeBSD.org >with "unsubscribe freebsd-questions" in the body of the message > ---- Robert Luce "Il faut supporter deux ou trois chenilles System/News Administrator si on veut connaŒtre les papillons.." - Antoine de Saint-Exup‚ry Finger rwl@gymnet.com for PGP Public Key Block To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message