I need to search for a phrase in thousands of documents and output to a file on Windows XP or Windows Server 2003. In the file that it outputs to it needs to included a certain number of characters before the search phrase and a certain number of characters after. I have downloaded GNU Grep but I can't get it to work, I might be using the wrong command. I want to use something like the following:-
grep -r -a 10 -b 20 "request" * > C:\[url removed, login to view]
grep -r -a 10 -b 20 "request" "c:\inetpub" > C:\[url removed, login to view]
If you know how to use grep or a similar program that can do this please bid on this project. Hopefully it should just take a few minutes if it is possible to do a search like this on GNU Grep.