First-line-only editing, part 2: Portable solutions
Rob McMahon
cudcv at warwick.ac.uk
Mon Nov 12 00:28:35 AEST 1990
In article <4152 at awdprime.UUCP> daveb at bach.austin.ibm.com (Dave Burton) writes:
>sed 's/.../.../;1q' file; tail +2 file
> or
>(sed 's/.../.../;1q'; tail +2) < file
Quack, quack, oops. This second one doesn't work. Sed buffers its input and
a bufferful goes missing. If it didn't a line goes missing.
>Now, truly, nuff said. :-)
Sorry about that.
Rob
--
UUCP: ...!mcsun!ukc!warwick!cudcv PHONE: +44 203 523037
JANET: cudcv at uk.ac.warwick INET: cudcv at warwick.ac.uk
Rob McMahon, Computing Services, Warwick University, Coventry CV4 7AL, England
More information about the Comp.unix.questions
mailing list