🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.unix.shell
Article #1186

Re: changing a ! to a \nC where \n is a newline

#1186
From: Dik T. Winter
Date: Thu, 20 Sep 1990 10:06
11 lines
1136 bytes
In article <2962@wyse.wyse.com> bob@wyse.UUCP (Bob McGowen x4312 dept208) writes:
 > In article <1990Sep18.023649.1336@virtech.uucp> cpcahil@virtech.UUCP (Conor P. Cahill) writes:
 >     >>I am trying to use the global substitution power in vi to 
 >     >>replace every occurrence of ! with a newline and a C (\nC)
 >   >:1,$s/!/<ctrl>-V<Return>C/g	(this will appear as:1,$s/!/^MC/g)
 > This will put carriage returns in the file, not newlines.
Wrong.  It puts newlines (although ^M is carriage return).  Confusing isn't it?
(This is at least true for the versions of vi I have access to.)
--
dik t. winter, cwi, amsterdam, nederland
dik@cwi.nl
Technical Details
Message-ID: <2198@charon.cwi.nl>
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!zephyr.ens.tek.com!uw-beaver!mit-eddie!bloom-beacon!eru!hagbard!sunic!mcsun!hp4nl!charon!dik
References: <5015@alpha.cam.nist.gov> <1990Sep18.023649.1336@virtech.uucp> <2962@wyse.wyse.com>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!zephyr.ens.tek.com!uw-beaver!mit-eddie!bloom-beacon!eru!hagbard!sunic!mcsun!hp4nl!charon!dik
From: dik@cwi.nl (Dik T. Winter)
Newsgroups: comp.unix.shell
Subject: Re: changing a ! to a \nC where \n is a newline
Keywords: vi
Message-ID: <2198@charon.cwi.nl>
Date: 20 Sep 90 10:06:13 GMT
References: <5015@alpha.cam.nist.gov> <1990Sep18.023649.1336@virtech.uucp> <2962@wyse.wyse.com>
Sender: news@cwi.nl
Organization: CWI, Amsterdam
Lines: 11