From a64487d5db57b9e281a5953b082618d2c1fca8a4 Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Sun, 13 Jan 2013 17:32:58 -0200 Subject: Removing old scripts and cleaning up some code --- misc/email/checkmail | 14 ++++++++++++++ misc/email/checkmail.sh | 9 --------- misc/email/vcard-filter | 0 3 files changed, 14 insertions(+), 9 deletions(-) create mode 100755 misc/email/checkmail delete mode 100755 misc/email/checkmail.sh mode change 100644 => 100755 misc/email/vcard-filter (limited to 'misc/email') diff --git a/misc/email/checkmail b/misc/email/checkmail new file mode 100755 index 0000000..078f111 --- /dev/null +++ b/misc/email/checkmail @@ -0,0 +1,14 @@ +#!/bin/bash +# +# Simple mail counter +# Inspired by http://www.vivaolinux.com.br/dicas/verDica.php?codigo=2432 +# + +# Fetch and compute +FETCH=`fetchmail -c` +TOTAL=`echo $FETCH | awk '{ print $1 }'` +SEEN=`echo $FETCH | awk '{ print $3 }' | sed -e 's/(//'` +NEW=`echo "$TOTAL - $SEEN" | bc` + +# Display response +echo $NEW/$TOTAL diff --git a/misc/email/checkmail.sh b/misc/email/checkmail.sh deleted file mode 100755 index 3a21c9a..0000000 --- a/misc/email/checkmail.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/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 diff --git a/misc/email/vcard-filter b/misc/email/vcard-filter old mode 100644 new mode 100755 -- cgit v1.2.3