Today I found a command to check unread gmail’s messages in terminal. But it just lists these messages’ names without contents.

Following is the command:

 curl -u gmail_account --silent "https://mail.google.com/mail/feed/atom" | perl -ne 'print "\t" if //; print "$2\n" if /<(title|name)>(.*)<\/\1>/;'

For example,xiangxianni is my gmail account:

wraith@wraith-desktop:~$ curl -u xiangxianni --silent "https://mail.google.com/mail/feed/atom" | perl -ne 'print "\t" if //; print "$2\n" if /<(title|name)>(.*)<\/\1>/;' 
Enter host password for user 'xiangxianni':
			Gmail - Inbox for xiangxianni@gmail.com
	[Windows 7 Home] Please moderate: "How to set time zone in command line in windows 7"
	WordPress