problem using recursive grep (-r option)

Gary Johnson garyjohn@spocom.com
Wed Aug 8 16:58:00 GMT 2012


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



More information about the Cygwin mailing list