54714024ef
From https://web.archive.org/web/20070101114026/http://voltar.org/dockapps/wmjmail-1.6.tgz
18 lines
382 B
Bash
Executable file
18 lines
382 B
Bash
Executable file
#!/bin/bash
|
|
################
|
|
|
|
spool=/var/spool/mail/${USER}
|
|
|
|
[ -n "$1" ] && spool="$1"
|
|
|
|
[ ! -f "$spool" ] && echo "0 - 0 - 0" && exit
|
|
|
|
msg=`cat ${spool} | grep -ic ^Message-ID:`
|
|
readm=`cat ${spool} | grep -c ^Status:\ RO`
|
|
fakem=`cat ${spool} | grep -ic ^Content-Type:\ Message.rfc`
|
|
|
|
msg=`expr ${msg} - ${fakem}`
|
|
newm=`expr ${msg} - ${readm}`
|
|
|
|
echo "${newm} - ${msg} - ${readm}"
|