Path: utzoo!attcan!uunet!lll-winken!lll-lcc!ames!mailrus!tut.cis.ohio-state.edu!bloom-beacon!mcgill-vision!mouse From: mouse@mcgill-vision.UUCP (der Mouse) Newsgroups: comp.unix.wizards Subject: Re: grep replacement Message-ID: <1145@mcgill-vision.UUCP> Date: 10 Jun 88 09:13:02 GMT References: <3324@phri.UUCP> <779@yabbie.rmit.oz> Organization: McGill University, Montreal Lines: 15 In article <779@yabbie.rmit.oz>, rcodi@yabbie.rmit.oz (Ian Donaldson) writes: > From article <3324@phri.UUCP>, by roy@phri.UUCP (Roy Smith): >> [A grep option to stop after one match] would certainly speed up >> things like >> grep "^Subject: " /usr/spool/news/comp/sources/unix/* > A simple permutation: > head -60 /usr/spool/news/comp/sources/unix/* | grep "^Subject: " > works fairly close to the mark, and doesn't waste much time at all. Except that it doesn't list the filename along with the match. der Mouse uucp: mouse@mcgill-vision.uucp arpa: mouse@larry.mcrcim.mcgill.edu