Created
July 4, 2017 14:17
-
-
Save jfcarr/61880bd75ae550601c5c32f41d38d57b to your computer and use it in GitHub Desktop.
Show subject of each unread Gmail message.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
curl -u johndoe:mypassword --silent "https://mail.google.com/mail/feed/atom" | tr -d '\n' | awk -F '<entry>' '{for (i=2; i<=NF; i++) {print $i}}' | sed -n "s/<title>\(.*\)<\/title.*name>\(.*\)<\/name>.*/\2 - \1/p" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment