Add script to count new mails

This commit is contained in:
coderkun 2018-10-19 17:52:49 +02:00
commit 101d3fda67

13
mail-count.bash Executable file
View file

@ -0,0 +1,13 @@
#!/bin/bash
# Settings
MAILDIRNEW="$HOME/Downloads/Mail/*/INBOX/new/"
# Count new mails
MAILNEW="$(find $MAILDIRNEW -type f | wc -l)"
echo $MAILNEW
echo $MAILNEW
[ ${MAILNEW} -ge 1 ] && exit 33
exit 0