PC Review


Reply
Thread Tools Rate Thread

Any grep like program that can do this?

 
 
Traveler
Guest
Posts: n/a
 
      30th Jul 2006
Hello,

I am looking for a small fast exe program that's can search
recursively large number of files for couple of words and return total
number of occurrence it found in all files?

if anything like is available?

Thank you
 
Reply With Quote
 
 
 
 
arachnid
Guest
Posts: n/a
 
      30th Jul 2006
On Sun, 30 Jul 2006 06:08:27 +0000, Traveler wrote:

> Hello,
>
> I am looking for a small fast exe program that's can search
> recursively large number of files for couple of words and return total
> number of occurrence it found in all files?
>
> if anything like is available?
>


Since you mention grep, I'm guessing you're a *nix fan. If so, you may
be interested in UnxUtils:

http://unxutils.sourceforge.net/

"Here are some ports of common GNU utilities to native Win32. In this
context, native means the executables do only depend on the Microsoft
C-runtime (msvcrt.dll) and not an emulation layer like that provided by
Cygwin tools"

The only standard tool I didn't find in there was strings. I think
it's www.sysinternals.com that has a version of strings for
Windows. It even has a unicode option.


 
Reply With Quote
 
Guy
Guest
Posts: n/a
 
      30th Jul 2006
Traveler wrote:

> I am looking for a small fast exe program that's can search
> recursively large number of files for couple of words and return
> total number of occurrence it found in all files?
>
> if anything like is available?


You can do a grep but I don't think you'll get the output you desire.

Searching for the words "input" and "output" something like:

grep -c -r " input\|output" *.* | grep -v ":0"

You won't get total tally, only count of matches per file.
(See below for example grep output)


You may want to check out MiniTrue <http://www.idiotsdelight.net/minitrue/>

A search and replace type utility which will also give an output you may desire.

Again searching for the words "input" and "output".

mtr -akn -r# *.* - input output

Here is the minitrue output:


String(s) Finds Replacements
input 813 -
output 1160 -

File
agrep.exe 148 0
base64.exe 4 0
bash.exe 1 0

<snip>

zcat.exe 7 0
zip.exe 7 0
4dos\4dos.com 7 0
4dos\4dos.hlp 5 0
4dos\intro.txt 7 0
4dos\option.exe 9 0
doc\agrep.txt 6 0
doc\aset10.txt 16 0

<snip>

doc\xrd.txt 2 0
doc\xset.txt 48 0

<snip>

doc\blat-d~1\blatcgi.txt 10 0
doc\blat-d~1\blathelp.txt 2 0
doc\blat-d~1\change~1.txt 1 0

<snip>

doc\curl-d~1\curl-hlp.txt 10 0
doc\curl-d~1\curl-man.txt 36 0
doc\curl-d~1\curl~1.htm 25 0

Total: 1973 0
Total Files Scanned: 325
Total Bytes Scanned: 17573683
Time Elapsed: 3.35 sec



Here is the grep output:

4DOS/4DOS.COM:1
4DOS/BATCOMP.EXE:2
4DOS/EXAMPLES.BTM:2
4DOS/INTRO.TXT:6
AGREP.EXE:12
BASE64.EXE:3
BAT2EXE.COM:1
BLAT.EXE:2

<snip>

DIRDATE.EXE:1
DIRNAME.EXE:2
doc/GREP.TXT:10
doc/SED.TXT:5
doc/SDIFF.TXT:4

<snip>

doc/MAKECAB.TXT:6
doc/WGET.HLP:1
doc/EGREP.TXT:8
doc/HUNT.TXT:8
doc/MSMTP.HTML:4
doc/curl-docs/MANUAL:5
doc/curl-docs/TheArtOfHttpScripting:2
doc/curl-docs/FAQ:4

<snip>

doc/blat-docs/syntax.txt:2
doc/blat-docs/cgi/blat-cgi.htm:1
doc/blat-docs/blathelp.txt:2
doc/XSET.TXT:40
doc/COLS.TXT:11
doc/WGET.TXT:6

<snip>

doc/TAIL.TXT:8
doc/RUNPROCESS.TXT:3
doc/HEAD.TXT:3
doc/CAT.TXT:5
doc/GUNZIP.TXT:3
EGREP.EXE:10
ERASERD.EXE:4
EXPR.EXE:2
FACTOR.EXE:3

<snip>

ZCAT.EXE:4
ZIP.EXE:5

--
OpenPGP: id=18795161E22D3905; preference=signencrypt;
url=http://guysalias.batcave.net/pgpkeys.txt
 
Reply With Quote
 
Traveler
Guest
Posts: n/a
 
      30th Jul 2006
I want to thank for the suggestions received i will try both options.

On Sun, 30 Jul 2006 01:59:38 -0500, Guy
<Use-Reply-To-Address-Header@[127.1]> wrote:

>Traveler wrote:
>
>> I am looking for a small fast exe program that's can search
>> recursively large number of files for couple of words and return
>> total number of occurrence it found in all files?
>>
>> if anything like is available?

>
>You can do a grep but I don't think you'll get the output you desire.
>
>Searching for the words "input" and "output" something like:
>
>grep -c -r " input\|output" *.* | grep -v ":0"
>
>You won't get total tally, only count of matches per file.
>(See below for example grep output)
>
>
>You may want to check out MiniTrue <http://www.idiotsdelight.net/minitrue/>
>
>A search and replace type utility which will also give an output you may desire.
>
>Again searching for the words "input" and "output".
>
>mtr -akn -r# *.* - input output
>
>Here is the minitrue output:
>
>
>String(s) Finds Replacements
> input 813 -
> output 1160 -
>
>File
> agrep.exe 148 0
> base64.exe 4 0
> bash.exe 1 0
>
> <snip>
>
> zcat.exe 7 0
> zip.exe 7 0
> 4dos\4dos.com 7 0
> 4dos\4dos.hlp 5 0
> 4dos\intro.txt 7 0
> 4dos\option.exe 9 0
> doc\agrep.txt 6 0
> doc\aset10.txt 16 0
>
> <snip>
>
> doc\xrd.txt 2 0
> doc\xset.txt 48 0
>
> <snip>
>
> doc\blat-d~1\blatcgi.txt 10 0
> doc\blat-d~1\blathelp.txt 2 0
> doc\blat-d~1\change~1.txt 1 0
>
> <snip>
>
> doc\curl-d~1\curl-hlp.txt 10 0
> doc\curl-d~1\curl-man.txt 36 0
> doc\curl-d~1\curl~1.htm 25 0
>
>Total: 1973 0
>Total Files Scanned: 325
>Total Bytes Scanned: 17573683
>Time Elapsed: 3.35 sec
>
>
>
>Here is the grep output:
>
>4DOS/4DOS.COM:1
>4DOS/BATCOMP.EXE:2
>4DOS/EXAMPLES.BTM:2
>4DOS/INTRO.TXT:6
>AGREP.EXE:12
>BASE64.EXE:3
>BAT2EXE.COM:1
>BLAT.EXE:2
>
> <snip>
>
>DIRDATE.EXE:1
>DIRNAME.EXE:2
>doc/GREP.TXT:10
>doc/SED.TXT:5
>doc/SDIFF.TXT:4
>
> <snip>
>
>doc/MAKECAB.TXT:6
>doc/WGET.HLP:1
>doc/EGREP.TXT:8
>doc/HUNT.TXT:8
>doc/MSMTP.HTML:4
>doc/curl-docs/MANUAL:5
>doc/curl-docs/TheArtOfHttpScripting:2
>doc/curl-docs/FAQ:4
>
> <snip>
>
>doc/blat-docs/syntax.txt:2
>doc/blat-docs/cgi/blat-cgi.htm:1
>doc/blat-docs/blathelp.txt:2
>doc/XSET.TXT:40
>doc/COLS.TXT:11
>doc/WGET.TXT:6
>
> <snip>
>
>doc/TAIL.TXT:8
>doc/RUNPROCESS.TXT:3
>doc/HEAD.TXT:3
>doc/CAT.TXT:5
>doc/GUNZIP.TXT:3
>EGREP.EXE:10
>ERASERD.EXE:4
>EXPR.EXE:2
>FACTOR.EXE:3
>
> <snip>
>
>ZCAT.EXE:4
>ZIP.EXE:5


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Grep Waz Windows Vista File Management 3 14th May 2007 04:23 AM
GREP Unix command =?Utf-8?B?S2FtbGVzaA==?= Windows XP General 5 29th Dec 2006 03:17 AM
Selecting all records that match a regular expression (like GREP) richard.j.whitaker@googlemail.com Microsoft Access Queries 3 16th Jun 2006 01:02 PM
GREP in VBA =?Utf-8?B?R2FyeSdzIFN0dWRlbnQ=?= Microsoft Excel Programming 2 23rd Aug 2005 01:39 PM
Grep dszady Freeware 0 6th Jul 2004 05:25 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 01:50 PM.