diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2013-01-13 15:37:49 -0200 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2013-01-13 15:37:49 -0200 |
commit | 454c6e3c77b3db507ee81875219089047fc2d5a3 (patch) | |
tree | 34ea351902ddd6094bc0a96a65b4bc07e9ee83d8 /misc/email/checkmail.sh | |
download | scripts-454c6e3c77b3db507ee81875219089047fc2d5a3.tar.gz scripts-454c6e3c77b3db507ee81875219089047fc2d5a3.tar.bz2 |
Initial import
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 |