Date: Sun, 10 Jan 1999 23:10:37 -0800 From: "Robert Luce" <rwl@gymnet.com> To: "charon@freethought.org" <charon@freethought.org> Cc: "freebsd-questions@freebsd.org" <freebsd-questions@FreeBSD.ORG> Subject: Re: replacing ^M in vi Message-ID: <199901110711.XAA18400@hub.freebsd.org>
next in thread | raw e-mail | index | archive | help
%s/<ctrl-v><enter>//g <ctrl-v> means press control-v <enter> 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199901110711.XAA18400>