diff options
Diffstat (limited to 'misc/email/checkmail.sh')
-rwxr-xr-x | misc/email/checkmail.sh | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/misc/email/checkmail.sh b/misc/email/checkmail.sh new file mode 100755 index 0000000..3a21c9a --- /dev/null +++ b/misc/email/checkmail.sh @@ -0,0 +1,9 @@ +#!/bin/bash +# inspirado em http://www.vivaolinux.com.br/dicas/verDica.php?codigo=2432 +# + +FETCH=`fetchmail -c` +TOTAL=`echo $FETCH | awk '{ print $1 }'` +SEEN=`echo $FETCH | awk '{ print $3 }' | sed -e 's/(//'` +NEW=`echo "$TOTAL - $SEEN" | bc` +echo $NEW/$TOTAL |