emacs-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#58134: closed (grep for windows Include GLOB pattern with double sta


From: GNU bug Tracking System
Subject: bug#58134: closed (grep for windows Include GLOB pattern with double star doesn't seem to work)
Date: Wed, 28 Sep 2022 17:08:02 +0000

Your message dated Wed, 28 Sep 2022 10:07:27 -0700
with message-id <9805f57d-e6e0-fcae-89d2-4eb703b5888c@cs.ucla.edu>
and subject line Re: bug#58134: grep for windows Include GLOB pattern with 
double star doesn't seem to work
has caused the debbugs.gnu.org bug report #58134,
regarding grep for windows Include GLOB pattern with double star doesn't seem 
to work
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs@gnu.org.)


-- 
58134: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=58134
GNU Bug Tracking System
Contact help-debbugs@gnu.org with problems
--- Begin Message --- Subject: grep for windows Include GLOB pattern with double star doesn't seem to work Date: Tue, 27 Sep 2022 23:19:42 +0000

Hello,

 

I was using grep for Windows version 3.5.

 

I was trying to pattern match files.

 

At first, I thought I could put a regex as the file pattern in the command, but that didn’t seem to work.

 

Then I looked at the --include option.

 

I tried

 

grep -l --include=”**/*.xml” foo .

grep -l --include=”**\*.xml” foo .

grep -l --include=”**\\*.xml” foo .

 

Adding the recursive -r didn’t help either.

 

However, this worked:

grep -rl --include=”*.xml” foo .

 

Is the double star supported on Windows? What is the proper way to do it?

 

All the best,

 

Alex


--- End Message ---
--- Begin Message --- Subject: Re: bug#58134: grep for windows Include GLOB pattern with double star doesn't seem to work Date: Wed, 28 Sep 2022 10:07:27 -0700 User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.11.0
On 9/27/22 16:19, Alex Benoit via Bug reports for GNU grep wrote:
However, this worked:
grep -rl --include="*.xml" foo .

Is the double star supported on Windows?

Yes and no. It's a POSIX glob, which means "**" is equivalent to "*", and that's what's supported. Whether it's MS-Windows shouldn't matter.


What is the proper way to do it?

Looks like you found it already.


--- End Message ---

reply via email to

[Prev in Thread] Current Thread [Next in Thread]