Path: utzoo!attcan!uunet!mcsun!hp4nl!star.cs.vu.nl!maart From: maart@cs.vu.nl (Maarten Litmaath) Newsgroups: comp.unix.questions Subject: Re: edit first line of long file Message-ID: <8038@star.cs.vu.nl> Date: 24 Oct 90 16:09:33 GMT References: <568@inews.intel.com> <4597:Oct2321:44:2190@kramden.acf.nyu.edu> <590@inews.intel.com> <10201:Oct2404:23:3890@kramden.acf.nyu.edu> Sender: news@cs.vu.nl Reply-To: maart@cs.vu.nl (Maarten Litmaath) Organization: VU Dept. of Computer Science, Amsterdam, The Netherlands Lines: 14 In article <10201:Oct2404:23:3890@kramden.acf.nyu.edu>, brnstnd@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