linux中怎么通过命令行获取gmail的新邮件

本篇文章为大家展示了linux中怎么通过命令行获取gmail的新邮件,内容简明扼要并且容易理解,绝对能使你眼前一亮,通过这篇文章的详细介绍希望你能有所收获。

linux下通过命令行获取gmail的新邮件,不需输入@gmail.com部分

#!/bin/bash
 
num="\033[1;36m"
end="\033[0m"
 
read -p "Enter your mail: " name
read -p "Enter pass of mail: " pass
 
atom=`wget -qO - https://$name:$pass@mail.google.com/mail/feed/atom \
 --secure-protocol=TLSv1 -T 3 -t 1 --no-check-certificate | grep \
 fullcount | sed -e 's/<fullcount>\(.*\)<\/fullcount>/\1/'`
 
echo -e 'You have '$num$atom$end' new letters.'

上述内容就是linux中怎么通过命令行获取gmail的新邮件,你们学到知识或技能了吗?如果还想学到更多技能或者丰富自己的知识储备,欢迎关注行业资讯频道。