mirror of https://github.com/leahneukirchen/mblaze
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
11 lines
206 B
Plaintext
11 lines
206 B
Plaintext
4 years ago
|
#!/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" }
|
||
|
'
|