Skip to content

Instantly share code, notes, and snippets.

@mikerr
Created April 20, 2018 21:02
Show Gist options
  • Save mikerr/086feee87b04ba37c5a471a7c0313c3d to your computer and use it in GitHub Desktop.
Save mikerr/086feee87b04ba37c5a471a7c0313c3d to your computer and use it in GitHub Desktop.
read last few gmail messages - for remote commands
#!/bin/bash
username="USERNAME"
password="PASSWORD"
echo
curl -u $username:$password --silent "https://mail.google.com/mail/feed/atom" | grep -oPm1 "(?<=<summary>)[^<]+"
# title = email subject
# summary = body of message
# name = sender name
# email = sender email
# issued = date sent
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment