Skip to content

Instantly share code, notes, and snippets.

@cokebar
Last active October 26, 2021 07:44
Show Gist options
  • Save cokebar/b17ee5e53e68ecde9efb6fc443811b4c to your computer and use it in GitHub Desktop.
Save cokebar/b17ee5e53e68ecde9efb6fc443811b4c to your computer and use it in GitHub Desktop.
generate_chnroute
wget -O- 'https://ftp.apnic.net/apnic/stats/apnic/delegated-apnic-latest' | awk -F\| '/CN\|ipv4/ { printf("%s/%d\n", $4, 32-log($5)/log(2)) }' > ./chnroute.txt
wget -O- 'https://ftp.apnic.net/apnic/stats/apnic/delegated-apnic-latest' | awk -F\| '/CN\|ipv6/ { printf("%s/%d\n", $4, $5) }' > ./chnroute_ipv6.txt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment