----- Original Message ----- From: "Colbeck, Andrew" <[EMAIL PROTECTED]>
> 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 *. Hmmm, this is very slow and finds matches in all mbx files, noxmail.log files, spamchk.log files, sys*.txt files, declude filter files, as well as forward.ima files - it parsed every file in every directory on the partition it was run from. On my test server, that has a total of 5 e-mail accounts, it took over 15 minutes and found 611 matches, even though I had only setup one of the 5 e-mail accounts to have a forwarding address at aol.com. My script took 5 seconds to run and found only one match, which is all it should have found. Sandy's script took 3 seconds to run and found only one match, as well. My script could run faster, but it does some additional parsing to clean-up the output, getting rid of all extra text except the file path info of matching files, so all you would see in the output file are lines like the following that contain aol.com in the forward.ima file: f:\imail\domain.com\users\janed\forward.ima I've got to concede this one to Sandy, though, for coming up with a single line script that runs fast and efficient, and uses native window/dos commands. 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.
