Last active
May 8, 2021 15:01
-
-
Save creamidea/f3a87ba95f0338cac29a9376995c82ba to your computer and use it in GitHub Desktop.
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
#!/bin/sh | |
echo generating... | |
curl 'http://ftp.apnic.net/apnic/stats/apnic/delegated-apnic-latest' | grep ipv4 | grep CN | awk -F\| '{ printf("%s/%d\n", $4, 32-log($5)/log(2)) }' > /tmp/chnroute.txt && echo "chnroute.txt generated" || exit 0 | |
echo copying... | |
cp /tmp/chnroute.txt /etc/storage/DEADC0DE/chnroute/ | |
echo cleaning... | |
rm -rf /tmp/chnroute.txt | |
echo DONE | |
# 0 3 */1 * * /xx/update_chnroute.sh |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment