This is the mail archive of the cygwin 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]
Other format: [Raw text]

Re: problem using recursive grep (-r option)


On 2012-08-08, marco atzeri wrote:
> On 8/8/2012 11:11 AM, AngusC wrote:
> >
> DO NOT TOP POST !
> 
> >I did try the --include way but in Cygwin it didn't work for some reason.

Both of these work fine for me in Cygwin (on Windows XP):

    grep -nH -r "my pattern" --include "*.log" .
    grep -nH -r "my pattern" --include=*.log .

> >Neither does
> >
> >find "." -name "*.log" -exec grep -nH "my pattern" {} \;

as does that

> 
> find "." -name "*.log" -exec grep -nH "my pattern" \{\} \;

and that.

The quoting of . and {} is not needed.

Perhaps the real problem is with "my pattern".

Regards,
Gary


--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      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]