标题:宅男追TBBT 出处:Felix021 时间:Wed, 02 Nov 2011 18:58:08 +0000 作者:felix021 地址:https://www.felix021.com/blog/read.php?2046 内容: #!/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 Generated by Bo-blog 2.1.0