🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.unix.shell
Article #1190

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

#1190
From: Toby Kelsey
Date: Thu, 20 Sep 1990 12:07
12 lines
859 bytes
>In article <5015@alpha.cam.nist.gov> coleman@cam.nist.gov (Sean Sheridan Coleman X5672) writes:

>  >How about the reverse, replace a newline with a character?

 By doing
  :g/pattern/j
(note small j) in vi, you replace the newline and leading spaces on the 
next line by a space; and
 :g/pattern/j!
concatenates the lines without inserting a space.
-- 
 Toby Kelsey	(chpetk@uk.ac.bath.gdr)
Technical Details
Message-ID: <1990Sep20.120702.26466@gdr.bath.ac.uk>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!mcsun!ukc!dcl-cs!gdt!chpetk
References: <5015@alpha.cam.nist.gov> <2961@wyse.wyse.com>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!mcsun!ukc!dcl-cs!gdt!chpetk
From: chpetk@gdr.bath.ac.uk (Toby Kelsey)
Newsgroups: comp.unix.shell
Subject: Re: changing a ! to a \nC where \n is a newline
Keywords: vi
Message-ID: <1990Sep20.120702.26466@gdr.bath.ac.uk>
Date: 20 Sep 90 12:07:02 GMT
References: <5015@alpha.cam.nist.gov> <2961@wyse.wyse.com>
Organization: School of Chemistry, University of Bath, UK
Lines: 12