On Mon, 2011-10-10 at 20:08 +0100, RW wrote: > On Mon, 10 Oct 2011 17:29:08 +0100 > Martin Gregorie wrote: > > > > for f in testdata/*.txt > > do > > spamc <testdata/$f | grep '^X-spam-status: ' >>result.txt > > For that to work you need the setting > > fold_headers 0
Fair comment: I use gawk rather than grep and my filter looks like this: spamc -l <$s | gawk ' BEGIN { tag=0 } /^X-Spam/ { tag=1; print; next } /^ / || /^\t/ { if (tag==1) { print } next } { tag = 0 } ' | where_ever I don't use 'fold_headers 0' because I don't want *any* differences between my test config and the live one. From the look of that filter I obviously ran into the folded line thing solved the problem with gawk. Martin