#!/bin/sh cd positive for f in * ; do /usr/local/etc/spamfilter/test_filter < `pwd`/$f | perl -e ' $msgid = $ARGV[0]; while () { /SPAM: ---------------- filter.pl: Spam Filter Results / and last; } while () { /SPAM: --------------------- End of Spam Filter Results / and last; print "$msgid: $_"; } ' $f done