Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT sources DOT redhat DOT com Delivered-To: mailing list cygwin AT sources DOT redhat DOT com Message-ID: <080101c07c22$2cf28f00$48a80241@glstnbry1.ct.home.com> From: "MarK Stucky" To: References: <3A5E2779 DOT 29738 DOT E908D08 AT localhost> <3A5E274E DOT C57D2FD2 AT yahoo DOT com> <20010111165405 DOT B5955 AT volta DOT certicom DOT com> Subject: Re: Recursive grep [WAS: Re: date] Date: Thu, 11 Jan 2001 17:59:38 -0500 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.00.2615.200 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2615.200 ----- Original Message ----- From: Ashok Vadekar To: Sent: Thursday, January 11, 2001 4:54 PM Subject: Re: Recursive grep [WAS: Re: date] > On Thu, Jan 11, 2001 at 04:36:14PM -0500, Earnie Boyd wrote: > > find . -name \*.cc -exec echo '{}' ';' -exec grep getenv '{}' ';' > Or with fewer keystrokes: > find . -name \*.cc -print -exec grep getenv '{}' ';' > > -- If you put the "-print" at the end, it will then only print the file name of files in which grep finds a match For example, from bash, try find . -name '*.c' -exec grep getenv {} \; -print Just my $0.02 --Mark -- Want to unsubscribe from this list? Check out: http://cygwin.com/ml/#unsubscribe-simple