mirror of https://github.com/leahneukirchen/mblaze
add contrib/mcount, a tool to count mails (possibly between pipes)
parent
41a9a6b40d
commit
17fe13a95f
@ -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" }
|
||||||
|
'
|
Loading…
Reference in New Issue