From ce65d5fa966d82456d778daf64bb5e48c2c5c3dc Mon Sep 17 00:00:00 2001 From: Benjamin Collet Date: Mon, 31 Jan 2022 15:17:11 +0100 Subject: [PATCH] Display number of IPs available instead of wrong mask --- get_prefixes.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/get_prefixes.sh b/get_prefixes.sh index 9105231..5cfd8ca 100755 --- a/get_prefixes.sh +++ b/get_prefixes.sh @@ -1,3 +1,6 @@ #!/usr/bin/env bash -curl -s https://ftp.ripe.net/ripe/stats/delegated-ripencc-extended-latest | awk -F "|" '$3 == "ipv4" && $7 ~ /(reserved|available)/ && $5 >= 256 { printf "%-20s\t%s\n", $4 "/" int(32-log($5)/log(2)), $7 }' > $(dirname -- "${BASH_SOURCE[0]}")/ipv4_available_reserved.txt +curl -s https://ftp.ripe.net/ripe/stats/delegated-ripencc-extended-latest | awk -F "|" ' +$3 == "ipv4" && $7 ~ /(reserved|available)/ && $5 >= 256 { + printf "%-15s\t%i\t%s\n", $4, $5, $7 +}' > $(dirname -- "${BASH_SOURCE[0]}")/ipv4_available_reserved.txt