diff options
Diffstat (limited to 'contrib')
-rwxr-xr-x | contrib/mcount | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/contrib/mcount b/contrib/mcount new file mode 100755 index 0000000..a6d1d5f --- /dev/null +++ b/contrib/mcount @@ -0,0 +1,10 @@ +#!/bin/sh +# mcount - count mails from sequence on stdin + +[ -t 1 ] && stdout=1 + +awk -v stdout=$stdout ' + !/^ *</ { n++ } + !stdout { print } + END { fflush(); print n " mails processed" > "/dev/stderr" } +' |