Nick, this is not possible with a single-line script. However, you can try
using something like the following in a batch file:
=====
egrep "Total weight|From:|action = DELETE" spam\dec0114.log | cut -b 21- |
sed s/"Last"/AALast/g | usort -k 1,2 | uniq -w 25 | grep -A 2 "AALast" |
egrep "Total|From" > temp1.txt
grep "From:" temp1.txt | cut -d ":" -f 1,4 | gawk "{print $1,$3}" >
temp2.txt
grep "Total weight" temp1.txt > temp3.txt
cat temp2.txt temp3.txt | usort | cut -b 19- > result.txt
del temp*.*
=====
Watch for line wrapping here. There should only be 5 lines in the batch
file, each line beginning as such:
egrep "Total weight
grep "From:"
grep "Total weight"
cat temp2.txt
del temp*.*
Bill
----- Original Message -----
From: "nick " <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, January 15, 2004 5:13 PM
Subject: Re: [Declude.JunkMail] A question for you power grepers -
> I have been trying to 'grep' out of the DJM a single line that contains
the IP <space> and the list of all the tests an email failed w/total score
for *deleted* messages.
>
> ex: 192.168.1.1 BL-XBL:7 DSBL:5. Total weight = 12.
>
> The list of the failed msg & score is on a sinle line but I cannot get
this output. I have Bill's cheat sheet on grepping but still I cannot get
it...
>
> Any help would really be appreciated!
>
> Thanks
>
> -Nick Hayer
>
>
> ---
> [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.