changing a ! to a \nC where \n is a newline
Toby Kelsey
chpetk at gdr.bath.ac.uk
Thu Sep 20 22:07:02 AEST 1990
>In article <5015 at alpha.cam.nist.gov> coleman at 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 at uk.ac.bath.gdr)
More information about the Comp.unix.shell
mailing list