Wed, Oct 04 2006

GREP for Windows - A very flexible grep for windows

I made a few bug fixes to Tim Charron's "GREP for Windows". These bugs were related to the subdirectory searching option (-S).

This is what Tim Charron's "Grep for Windows" webpage has to say about Grep:

GREP is a well known tool in the unix environment. There are several ports available that I came across for Windows. However, NONE of them allowed me to search through subdirectories (this functionality is easy on unix using the shell's file manipulation tools). I modified GNU grep 2.0 to allow searching of subdirectories.

To search subdirectories, do something like this:

grep -S "searchtext" *.txt
grep -S "searchtext" \personal\files\*.txt
grep -S searchtext C:\*.*

Click here to download the latest version of "Grep for Windows".

4 comment(s)

Mike wrote @

option s
It doesn't appear that the option '-S' (capitalized as in the example) is valid. '-s' perhaps.

Mike wrote @

oops, my bad
It does work afterall.

Morteza wrote @

Thanks
You saved my day, Thanks

Tom wrote @ 9:18:43, Sun Nov 11, 2007


This grep is fast! Thanks! grep from GnuWin32 (v2.5.1a, 22 June 2007) also now supports recursive directory search. It's slower though. This searches all 'html' and 'txt' files in a directory for a word: grep -S "\bWORD\b" "C:\Dir\*.txt" "D:\Dir\*.html"

 

Add a comment:








Copyright ©2004-2007 O. Patrick Barnes. All rights reserved.  

Validate XHTML Validate CSS Validate RSS Green Web Hosting! This site hosted by DreamHost.