Sed question
John Cornelius
jc at piaget.UUCP
Thu Dec 18 13:27:36 AEST 1986
In article <107 at dcl-csvax.comp.lancs.ac.uk> david at comp.lancs.ac.uk (David T. Coffield) writes:
>In "sed" how can does one form a command to do the following:
>
>Take file A, find the first line beginning with a 150,
>append a line of text at that point and then write out
>file A (all of it) with the newly inserted line.
>
I suppose you could try
/^150/a\
<THE LINE YOU WANT TO INSERT>
--
John Cornelius
(...!sdcsvax!piaget!jc)
More information about the Comp.unix.wizards
mailing list