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)


AngusC wrote:
>If I use the command:
>
>grep -nH -r "my pattern" *.*
>
>I get results back as expected
>
>But if the file pattern is like this:
>
>grep -nH -r "my pattern" *.log
>
>I get no results back (Even though I have a ton of files with this pattern
>with .log file extension).
>
>Am I doing something wrong?

Yes.

At a guess, all your .log files are in subdirectories that don't match *.log.
I'd recommend using `find`. Running `man find` will give you some instructions,
as will Google.

That said, you've not given any indication as to why your problem is
specifically relevant to Cygwin. There're plenty of places to get general help
with using Linux tools, but this isn't one of them -- this list is for problems
that are specific to Cygwin. I'd personally recommend heading over to Stack
Overflow or Super User, but there're *many* alternatives for advice on using
generic Linux tools.

If you do want advice from here, I recommend reading and following the
instructions at <http://cygwin.com/problems.html>. Folk here tend to be much
more accommodating if you show you've done the basic research yourself.

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