想法是由这个帖子来的。
备份如下:
#!/bin/bash
# name : gmail_notify
login="x"
passwd="xxx"
inbox=`wget -T 3 -t 1 -q --secure-protocol=TLSv1 --no-check-certificate \
--user=$login --password=$passwd \
https://mail.google.com/mail/feed/atom -O - | \
sed -ne '/fullcount/s:.*>\([0-9]\+\)<.*:\1:p' 2> \
/dev/null`
if [ ! x$inbox == x'' ]
then
if [ ! $inbox -eq 0 ]
then
echo "$inbox new mail(s) in your box."
Xdialog --title "gmail messenger" --msgbox "please check the mail(s)." 5 40 &
# play *.mp3 > /dev/null 2>&1 &
else
echo "no new mails found!"
fi
else
echo "something error!"
fi
Posted on 04月 4th, 2008 作者: aBiNg
Filed under: Script
- gnuplot Tips - 2009-11-16
- CVF 自定义 console 模块 - 2009-10-26
- vim 中隐藏多行注释 - 2009-10-26
Leave a Reply
You must be logged in to post a comment.