mirror of
https://github.com/leahneukirchen/mblaze
synced 2024-11-15 18:14:02 +00:00
11 lines
206 B
Bash
Executable File
11 lines
206 B
Bash
Executable File
#!/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" }
|
|
'
|