Mailing-List: contact cygwin-help@sourceware.cygnus.com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe@sources.redhat.com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin@sources.redhat.com>
List-Help: <mailto:cygwin-help@sources.redhat.com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner@sources.redhat.com
Delivered-To: mailing list cygwin@sources.redhat.com
Message-ID: <080101c07c22$2cf28f00$48a80241@glstnbry1.ct.home.com>
From: "MarK Stucky" <mstucky5@home.com>
To: <cygwin@cygwin.com>
References: <3A5E2779.29738.E908D08@localhost> <3A5E274E.C57D2FD2@yahoo.com> <20010111165405.B5955@volta.certicom.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 <avadekar@certicom.com>
To: <cygwin@cygwin.com>
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

