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)

TIA


----- Original Message ----- From: "Bill Landry" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Saturday, November 06, 2004 6:40 PM
Subject: Re: [Declude.JunkMail] LOG Levels



----- Original Message ----- From: "Serge" <[EMAIL PROTECTED]>


Here is a line that will give me all sessions from a user:

grep "MAIL FROM:[EMAIL PROTECTED]" D:\log1104.txt | gawk "{print $5}" |
uniq
 > test.txt

Now how do I use a pipe or a batch file to get all the lines for all these
sessions in a single file ?
(this is Imail syslog logs)

Use a double pipe ">>" and each additional like will be appended to the end
of the file:


grep "MAIL FROM:[EMAIL PROTECTED]" D:\log1104.txt | gawk "{print $5}" | uniq
test.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.



---
[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