[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Nmh-workers] Selecting messages with a range of Spam scores
From: |
David Levine |
Subject: |
Re: [Nmh-workers] Selecting messages with a range of Spam scores |
Date: |
Fri, 20 Feb 2015 12:57:56 -0500 |
Norm wrote:
> But the best way to get the message numbers having such a component,
> WITH the corresponding contents of the component is not obvious to
> me.
Some variation of (assuming bash and GNU grep):
msgs=last:45
for i in $(pick $msgs --X-Spam-Status score=); do
[ $i -ne 0 ] && \
grep --with-filename --ignore-case ^X-Spam-Status $(mhpath $i)
done
It relies on pick's --component support. It provides the path to the
message, not the message number, but that could be adjusted with sed
or whatever.
Or instead of all that, would this do what you want?
pick $msgs --X-Spam-Status score='[3456]\.'
That reduces the top of your score range from 6.2 to 6, but is it
close enough? If not, a more complex expression would catch it.
David
Re: [Nmh-workers] Selecting messages with a range of Spam scores, Ken Hornstein, 2015/02/20
Re: [Nmh-workers] Selecting messages with a range of Spam scores, Ralph Corderoy, 2015/02/21