All you need to display your latest GMail messages in the command line is this one-liner:
curl -u username:password –silent “https://mail.google.com/mail/feed/atom” | tr -d ‘\n’ | awk -F ‘<entry>’ ‘{for (i=2; i<=NF; i++) {print $i}}’ | sed -n “s/<title>\(.*\)<\/title.*name>\(.*\)<\/name>.*/\2 – \1/p”
Substitute username:password with your GMail username and password.
bash: syntax error near unexpected token `(‘
that was the error.
Replace the “” and ‘ characters because WordPress changes them
Great! thx 🙂
Is there a command that can be added so that if it comes back saying new emails 1 or more then it’ll open gmail.com through say firefox?
any one now how to convert html file to text file using html2text using direct url link
It gives me this reponse to cURL:
Unauthorized
Unauthorized
Error 401