5

Show your unread emails (gmail)

Posted in Messaging by zhhz 908 days ago

Show your un-read email on your desktop from Gmail.

Please change yourgmailaccount and your_password in the shell script.

Script

curl -u your_gmail_account:your_password --silent "https://mail.google.com/mail/feed/atom" | tr -d 'n' | awk -F '' '{for (i=2; i<=NF; i++) {print $i}}' | sed -n "s/<title>(.*)</title.*name>(.*)</name>.*/2 - 1/p"

Comments

Log in to comment or register here.