Hey, Bill.  You've got your thinking cap on too tight!

> Find "@aol.com" \*\forward.ima >found.txt
>
> The idea is to search all subdirectories of the current director for
> forward.ima and look to see if @aol.com is in there.

fgrep -r -i -l "@aol.com" forward.ima *.

fgrep instead of egrep means treat the search text as plaintext, no regexp
-r means do a recursive search
-i means case-insensitive search
-l means if there is a match, only output the filename that matched
forward.ima is the filename you want to search
*. means another filename you want to search, and this will match
subdirectories

Andrew 8)

p.s. Thanks to Bill and Sandy; I learned something valuable from each of
your techniques.


-----Original Message-----
From: Bill Landry [mailto:[EMAIL PROTECTED] 
Sent: Saturday, July 17, 2004 11:07 PM
To: [EMAIL PROTECTED]
Subject: Re: [Declude.JunkMail] OT: find command


----- Original Message ----- 
From: "John Tolmachoff (Lists)" <[EMAIL PROTECTED]>


> Is it possible to use the * in the find command?
>
> Example:
> Find "@aol.com" \*\forward.ima >found.txt
>
> The idea is to search all subdirectories of the current director for
> forward.ima and look to see if @aol.com is in there.

Try:

* dir /S c:\imail | grep Directory | gawk "{print $1,$3,$2}" | sed
"s/Directory/grep aol\\.com/g" | sed "s/ of/\\forward\.ima/g" > aol-find.bat
* aol-find.bat > aol-temp.txt
* grep matches aol-temp.txt | gawk "{print $3}" > aol-found.txt

Watch for word-wrapping - for ease of determining lines starts, I've added a
* (be sure to remove the *).  Adjust path to your IMail directory or
appropriate sub-directory.

Bill

---
[This E-mail was scanned for viruses by Declude Virus
(http://www.declude.com)]

---
This E-mail came from the Declude.JunkMail mailing list.  To
unsubscribe, just send an E-mail to [EMAIL PROTECTED], and
type "unsubscribe Declude.JunkMail".  The archives can be found
at http://www.mail-archive.com.
---
[This E-mail was scanned for viruses by Declude Virus (http://www.declude.com)]

---
This E-mail came from the Declude.JunkMail mailing list.  To
unsubscribe, just send an E-mail to [EMAIL PROTECTED], and
type "unsubscribe Declude.JunkMail".  The archives can be found
at http://www.mail-archive.com.

Reply via email to