LuKreme wrote: > On 16-May-2009, at 02:43, Yet Another Ninja wrote: >> On 5/13/2009 9:33 AM, Yet Another Ninja wrote: >>> Assuming Henrik may appreciate some stats, even if minimal like below: >>> Yesterday's hits: >>> grep EMAILBL /var/log/maillog.1 | wc -l >>> 1263 >> >> Friday's count: >> >> >> grep 'is spam' /var/log/maillog.1 | wc -l >> 22397 >> >> grep EMAILBL /var/log/maillog.1 | wc -l >> 1891 > > grep EMAILBL /var/log/maillog.1 | grep -v "is spam" | wc -l > > ??
How is that going to work if you are telling grep to output everything that does NOT contain "is spam" (-v = select non-matching lines)? Why not simply: grep -c EMAILBL /var/log/maillog.1 If all you want is the count of how many messages contained a hit from "EMAILBL", the above will give you that. Bill