Skip to content

Instantly share code, notes, and snippets.

@chrismdp
Last active December 20, 2015 02:59
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save chrismdp/6060849 to your computer and use it in GitHub Desktop.
Save chrismdp/6060849 to your computer and use it in GitHub Desktop.
#!/bin/bash
if [ ! -z "$(find ~/.mail/*/INBOX -type f)" ]; then
printf '📥 '
for box in `ls ~/.mail | grep -v temp`; do
emails=$(find ~/.mail/$box/INBOX -type f | wc -l)
[ $emails -ne 0 ] && printf '%s:%d ' ${box:0:1} $emails
done
printf '~\n'
fi
@chrismdp
Copy link
Author

...the [] character on line four is an emoji (I use 📥)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment