This is the mail archive of the cygwin@sources.redhat.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Recursive grep [WAS: Re: date]



----- 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]