Grep with Everything!

Plug-in and third party software discussion.
Post Reply
Posts: 7
Joined: Wed Jan 20, 2010 10:48 pm

Grep with Everything!

Post by gserack » Tue Nov 02, 2010 6:17 pm

For those who use the command-line grep tool ported by Tim Charron on Windows, I've updated it so that it can search for files using an everything query: ...

I've added a switch ( -Z ) that lets you do this:

Code: Select all

grep -i -Z foo.*bar  files*.txt 
this will get the list of files to grep thru from Everything and perform the grep operation on the results.

Posts: 2404
Joined: Thu Sep 03, 2009 6:48 pm

Re: Grep with Everything!

Post by therube » Thu Nov 04, 2010 6:43 pm

Neat. (I've only looked at this briefly so far.)

So ...

Code: Select all

grep   -Z <grep search string>   <everything search>
First instance search for the string "manual" within files named "arj txt".
Second find instances where the search string "manual" was NOT (-L) found in files named "arj txt".


Posts: 7
Joined: Wed Jan 20, 2010 10:48 pm

Re: Grep with Everything!

Post by gserack » Mon Nov 15, 2010 4:05 pm

Glad you like it :D

I use this new grep so much now, I'm completely stunned.


Posts: 6
Joined: Mon Feb 08, 2010 5:30 am

Re: Grep with Everything!

Post by ambimind » Tue Dec 14, 2010 1:22 pm

Nice work gserack. Have been doing this with batch files for a long time, this will make it much easier.
I'd first use the command-line version of "everthing" and ">" the results to a text file. Then GNU grep would take its cue of which files to search from this text file.
I also do this with GNU "sed" for modifing lists of files, would be great to have a -Z for "sed" also.


Posts: 5
Joined: Wed Dec 15, 2010 1:19 pm

Re: Grep with Everything!

Post by jeroenp » Wed Dec 15, 2010 1:25 pm

Here this grep always fails.

OS: Windows 7 Ultimate x64
tried both a cmd prompt as normal and as administrator mode.

C:\bin>grep -Z nullabletypes-*.txt com

If I turn the search arguments around, then it waits forever in administrator mode, and still crashes in non-administrator mode:

C:\bin>grep -Z com nullabletypes-*.txt

(yes, there are files named like nullabletypes-*.txt)

The crash is consistent:

Problem signature:
Problem Event Name: BEX
Application Name: grep.exe
Application Version:
Application Timestamp: 4cd053b2
Fault Module Name: grep.exe
Fault Module Version:
Fault Module Timestamp: 4cd053b2
Exception Offset: 0001712f
Exception Code: c0000417
Exception Data: 00000000
OS Version: 6.1.7600.
Locale ID: 1033
Additional Information 1: b389
Additional Information 2: b3895b5bdc4892443cdb0226543f9d84
Additional Information 3: 09c8
Additional Information 4: 09c84ea14ae3f6b1d8189ee98377b1e5

Read our privacy statement online: ... cid=0x0409

If the online privacy statement is not available, please read our privacy statement offline:

Post Reply