Skip to content

Instantly share code, notes, and snippets.

@tensorfields
Created January 6, 2012 00:24
Show Gist options
  • Save tensorfields/1568175 to your computer and use it in GitHub Desktop.
Save tensorfields/1568175 to your computer and use it in GitHub Desktop.
Check unread Gmail with nice formatting
curl -u username --silent "https://mail.google.com/mail/feed/atom" | awk 'BEGIN{FS="\n";RS="(</entry>\n)?<entry>"}NR!=1{print "\033[1;31m"$9"\033[0;32m ("$10")\033[0m:\t\033[1;33m"$2"\033[0m"}' | sed -e 's,<[^>]*>,,g' | column -t -s $'\t'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment