Nov 2

宅男追TBBT 不指定

felix021 @ 2011-11-2 18:58 [IT » 其他] 评论(1) , 引用(0) , 阅读(6662) | Via 本站原创 | |
#!/bin/bash

#check twice a day
#0  2,10    *  *  *  cd /home/felix021/code/tbbt && ./check.sh

now=`cat now`
now=`expr $now + 1`

url="http://yyets.com/showresource-juji-1005.html"

wget $url -O output.html &> /dev/null

pattern=S05E$now
if [ $now -lt 10 ]; then
    pattern=S05E0${now}
fi

if grep "output.html" -e $pattern &> /dev/null; then
    echo $now > now
    echo "please check $url" | mail -t "felix021@扣扣.com" -s "TBBT05 update: $now"
fi

rm -f output.html




欢迎扫码关注:




转载请注明出自 ,如是转载文则注明原出处,谢谢:)
RSS订阅地址: https://www.felix021.com/blog/feed.php
Felix021
2011-11-4 18:17
这是一条隐藏评论或留言。您需要以合适的身份登入后才能看到。
分页: 1/1 第一页 1 最后页
发表评论
表情
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
打开HTML
打开UBB
打开表情
隐藏
记住我
昵称   密码   *非必须
网址   电邮   [注册]