Path: utzoo!attcan!uunet!zephyr.ens.tek.com!uw-beaver!milton!dali.cs.montana.edu!uakari.primate.wisc.edu!zaphod.mps.ohio-state.edu!usc!elroy.jpl.nasa.gov!ucla-cs!rutgers!njin!princeton!shine.Princeton.EDU!pfalstad From: pfalstad@shine.Princeton.EDU (Paul John Falstad) Newsgroups: comp.unix.questions Subject: Re: edit first line of long file Message-ID: <3551@idunno.Princeton.EDU> Date: 24 Oct 90 14:19:59 GMT References: <568@inews.intel.com> <4597:Oct2321:44:2190@kramden.acf.nyu.edu> <2164@sixhub.UUCP> Sender: news@idunno.Princeton.EDU Organization: Princeton University, Princeton, New Jersey Lines: 51 In article <2164@sixhub.UUCP> davidsen@sixhub.UUCP (bill davidsen) writes: >In article <4597:Oct2321:44:2190@kramden.acf.nyu.edu> brnstnd@kramden.acf.nyu.edu (Dan Bernstein) writes: >$ time { head -1; sed 's/foo/bar/'; cat; } < x.tmp > /dev/null > >real 0m3.16s >user 0m1.86s >sys 0m0.70s >$ exit >Script ended [y.tmp] at Tue Oct 23 23:05:28 1990 > > How 'bout that! The overhead of all the other stuff made it slower. I >guess I'll vote for using just plain sed, because it's easier, faster, It has the added bonus that it works. I tried the following on my system: % cat >foob foo bar ^D % ( head -1 | sed 's/foo/bar/' ; cat )