#!/bin/bash username="USERNAME" password="PASSWORD" echo curl -u $username:$password --silent "https://mail.google.com/mail/feed/atom" | grep -oPm1 "(?<=<title>)[^<]+" | sed '1d'
Make sure you replace the username and password with your own. If you get no results, check your email for a message stating a sign in attempt was blocked. Open the email and follow the directions.