Path: utzoo!utgpu!water!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!husc6!hscfvax!mohamed
From: mohamed@hscfvax.harvard.edu (Mohamed Ellozy)
Newsgroups: comp.unix.wizards
Subject: Re: new grep
Message-ID: <582@hscfvax.harvard.edu>
Date: 21 Jun 88 12:20:18 GMT
References: <16237@brl-adm.ARPA>
Reply-To: mohamed@hscfvax.UUCP (Mohamed Ellozy)
Organization: Health Sciences Computing Facility, Harvard University
Lines: 18

In article <16237@brl-adm.ARPA> williams@nrl-css.arpa writes:
>	        Al Aho and I are designing a replacement for grep, egrep
>		and fgrep.  The question is what flags should it support and
>		what kind of patterns ...
>	 
>	I have always thought it would be nice to print only the first match.
>	
>	        (Root Boy) Jim Cottrell 
>
>I'll second this.  There have been many times when I simply wanted to
>detect the presence of a pattern in a file, then stop searching.  Combining
>this with the -n option can also be useful.

Also times when I am searching for something that is close to the start
of a long file (e. g. a host that is close to the start of /etc/hosts).
I can save time by doing a head -NNN | grep, but I must guess a suitable
value for NNN, while a grep that quits after the first match does it for
me.