Last active
October 26, 2021 04:19
-
-
Save ZE3kr/b0e1989110e0d0e5c1ef189144a44dcc to your computer and use it in GitHub Desktop.
This file contains 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
#!/bin/bash | |
for (( ; ; )); do | |
mv new.json old.json 2> /dev/null | |
curl 'https://www.ems.com.cn/apple/getMailNoRoutes' --data-raw 'mailNum=EZ690XXXXXXCN' -s > new.json | |
DIFF_OUTPUT="$(diff new.json old.json)" | |
if [ "0" != "${#DIFF_OUTPUT}" ]; then | |
# Send notification here | |
echo "CHANGED" | |
fi | |
sleep 10 | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment