Xref: utzoo comp.unix.wizards:8911 comp.unix.questions:7302 Path: utzoo!attcan!uunet!husc6!mailrus!ames!umd5!cvl!elsie!ado From: ado@elsie.UUCP (Arthur David Olson) Newsgroups: comp.unix.wizards,comp.unix.questions Subject: Re: grep replacement Message-ID: <8077@elsie.UUCP> Date: 28 May 88 13:27:36 GMT References: <7882@alice.UUCP> <5630@umn-cs.cs.umn.edu> <6866@elroy.Jpl.Nasa.Gov> <1036@cfa.cfa.harvard.EDU> Organization: NIH-LEC, Bethesda, MD Lines: 10 > > There have been times when I wanted a grep that would print out the > > first occurrence and then stop. > > grep '(your_pattern_here)' | head -1 Doesn't cut it for grep '(your_pattern_here)' firstfile secondfile thirdfile ... -- ado@ncifcrf.gov ADO is a trademark of Ampex.