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=
On 9/28/22 10:29, Alex Benoit wrote:
For instance, if I run the grep command from /, and I have the files:
/a/b/folder/file.xml
/a/b/file2.xml
/a/folder/file3.xml
/folder/file4.xml
I want to match the file.xml, file3.xml and file4.xml, but not file2.xml, because it is
not under a folder named "
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'
I see, this is not very easy to do on the Windows side of things, so grep has a
very basic pattern matching capability for files. Thanks for the help, I'll
find something that works. Was just wondering if I missed anything.
-Original Message-
From: Paul Eggert
Sent: Wednesday, Septembe
Thanks Paul, looks like the syntax reference I was using was not the right one.
What I'm really trying to do is a bit more complex and I cannot figure out if
it's just not a supported feature of grep or if I'm not able to come up with
the right syntax for it.
I am trying to make an include filt