用shell脚本监控线路是否改变
#/bin/sh
#diff.sh
curl http://ctc-router-reports-notun-***.vm.stm.com/report/trace-POP-NOTUN/201208/`date +%d`/8to-sng-203.76.172.113.txt 2>&1|awk '{print $2}' >`date +%Y%m%d`.txt
curl http://ctc-router-reports-notun-***.vm.stm.com/report/trace-POP-NOTUN/201208/`date -d '-1 day' +%d`/8to-sng-203.76.172.113.txt 2>&1 '{print $2}'  >`date -d '-1 day' +%Y%m%d`.txt
diff `date -d '-1 day' +%Y%m%d`.txt `date +%Y%m%d`.txt >`date +%Y%m%d`change.txt
if test -s `date +%Y%m%d`change.txt
then
 echo "8to-sng-203.76.172.113 is change"|mail -s "trace is changing" luoguoling@smalltreemedia.com
else
 exit 0
f