edit first line of long file

Maarten Litmaath maart at cs.vu.nl
Thu Oct 25 02:09:33 AEST 1990


In article <10201:Oct2404:23:3890 at kramden.acf.nyu.edu>,
	brnstnd at kramden.acf.nyu.edu (Dan Bernstein) writes:
)...
)> > No, it's not. Try head -1 | sed 's/.../.../'; cat.
)...
)Huh? First the head runs, grabbing the first line and putting it through
)sed with output to wherever. Once sed has finished, cat runs, putting
)the rest of the file through. This solves the problem posed by the
)original poster.

Your solution does _not_ work.  Try it!
Hint: what if `head' were using block-buffered IO?
--
Waiting for this to work: cat /internet/cs.vu.nl/finger/maart



More information about the Comp.unix.questions mailing list