在这篇文章中,我将为你展示 Linux 命令行的另一个漂亮干练的使用案例:访问 Google 的 Gmail 服务,有需要的小伙伴可以参考下。
linux下通过命令行获取gmail的新邮件,不需输入@gmail.com部分
?
1 2 3 4 5 6 7 8 9 10 11 12 13 #!/bin/bash num="33[1;36m" end="33[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.'以上所述就是本文的全部内容了,希望大家能够喜欢。