-
-
Save clintonpaquin/8444713 to your computer and use it in GitHub Desktop.
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 | |
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; |
Looks like it's a moot point, either terminal-notifier or Notification Center appears to strip out all line breaks no matter how you format it.
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
in my case, I had 2 messages ... so yeah, you would only see 2. Let's say you had 5 ... then it would display as follows, each message on a new line (or line break between them so they don't string together)
Subject: Message from foo (from [email protected])
Subject: Message from bar (from [email protected])
Subject: Message from bat (from [email protected])
Subject: Message from bazz (from [email protected])
Subject: Message from buzz (from [email protected])