Skip to content

Instantly share code, notes, and snippets.

@clintonpaquin
Created January 15, 2014 21:08
Show Gist options
  • Save clintonpaquin/8444713 to your computer and use it in GitHub Desktop.
Save clintonpaquin/8444713 to your computer and use it in GitHub Desktop.
#!/bin/bash
user=clinton.paquin
pass=$(security find-internet-password -w -a "$user" -s "accounts.google.com")
curl -u "$user:$pass" --silent "https://mail.google.com/mail/feed/atom"| perl -ne '
print "Subject: $1 " if /<title>(.+?)<\/title>/ && $title++;
print "(from $1)" if /<email>(.+?)<\/email>/;
' | terminal-notifier -title "Gmail" -sound default;
@clintonpaquin
Copy link
Author

I guess that's the answer I was looking for ... I tried a bunch of options and didn't have any luck. Thanks for the time, really appreciated. Congrats on going out on your own BTW, I'm a paid subscriber :)

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