欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  网络运营

linux下通过命令行获取gmail的新邮件

程序员文章站 2022-06-02 08:42:46
linux下通过命令行获取gmail的新邮件,不需输入@gmail.com部分 #!/bin/bash num="\033[1;36m" end="\0...

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.'

以上所述就是本文的全部内容了,希望大家能够喜欢。