Last active
August 13, 2018 17:47
-
-
Save jasoncartwright/e95e228656ce30610607343f8b83938c to your computer and use it in GitHub Desktop.
Number of IP addresses Google says they own
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
total=0 | |
for slash in $(dig TXT +short _netblocks{,2,3}.google.com | tr ' ' '\n' | grep '^ip4:' | cut -d '/' -f 2); do | |
total=$((total+$(echo "2^(32-$slash)" | bc -l))) | |
done | |
echo $total |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment