----- Original Message -----
From: "Serge" <[EMAIL PROTECTED]>
> Sorry, i may not expressed myself
>
> I need to
> grep %variable% ...
>
> Where the variable takes all the values generated by the first grep:
> grep "MAIL FROM:[EMAIL PROTECTED]" D:\log1104.txt | gawk "{print $5}" |
uniq
>
> Should i use some kind of
> FOR instruction in a Windows batch file ?
> Or is there a way to achieve that in unix util ?
>
> Suppose the first grep gives
> (71c80106004a8af1)
> (7202010b004a8b02)
> (7206010d004a8b05)
> (72b70136004a8b35)
> (72f300fb004c8b48)
> (732f015e067a8b5a)
> (736c00f5002a8b6e)
> (74d201f4069c8bbc)
> (7587038a063c8beb)
> (758b0181067a8bed)
>
> How do I automate "grepping" all the lines for the above sessions from the
> log files ? (without manually running a grep for each one)
You will need a two line batch file to do this. Try:
grep "MAIL FROM:[EMAIL PROTECTED]" D:\log1104.txt | gawk "{print $5}" |
cut -b 6- | uniq > temp.txt
grep -f temp.txt f:\imail\spool\spam\log\dec1105.log > results.txt
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.