Created
April 20, 2018 21:02
-
-
Save mikerr/086feee87b04ba37c5a471a7c0313c3d to your computer and use it in GitHub Desktop.
read last few gmail messages - for remote commands
This file contains 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 | |
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