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 "" | 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 "" | perl -ne 'print "\t" if //; print "$2\n" if /<(title|name)>(.*)<\/\1>/;' 
Enter host password for user 'xiangxianni':
			Gmail - Inbox for
	[Windows 7 Home] Please moderate: "How to set time zone in command line in windows 7"