Hi all,
I try to obtain all of the subnets belong to the same AS, say, for google,
which has the asn 15169.
I tried the following several methods, but each of them give different
results:
[1] curl -s
ipinfo.io/aS15169/ |
awk -v RS=\" -v avar=AS15169 ' $0 ~ "^[/]" avar "[/]" && !/[:]/ {print
substr($0, length(avar) +3) } '
[2] curl -s
http://thyme.apnic.net/current/data-raw-table |
awk '$2 == 15169 {print $1}'
[3] whois -h
whois.radb.net '!gas15169' | sed '1d;$d' |
sed ':a ; N;s/\n// ; t a ;' | tr ' ' '\n'
Any hints for this issue?
Regards
--
.: Hongyi Zhao [ hongyi.zhao AT
gmail.com ] Free as in Freedom :.