Last active
March 31, 2016 00:34
-
-
Save caiguanhao/f0721061d63fb94c1b2ade676a00cb8a to your computer and use it in GitHub Desktop.
get notified every time ems info gets updated
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
while :; do \ | |
export INFO="$(curl -s http://www.ems.com.cn/apple/query/EZ480728326CN | \ | |
grep td-main | sed 's/<[^>]*>//g' | awk '{$1=$1}NF>1{print}' | tr -d '\r')"; \ | |
test "$INFO" != "$LAST" && \ | |
echo "$INFO" && echo "$INFO" | wechat-notify --raw oBjSswsfgSvA6FlrR0rszh5eThhI@CGH; \ | |
export LAST="$INFO"; sleep 10; \ | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment