wiki:whois_lookup_list_ips_find_countries
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| wiki:whois_lookup_list_ips_find_countries [2022/04/25 08:26] – [whois lookup on list of IPs and find countries] make country starti with capital letter antisa | wiki:whois_lookup_list_ips_find_countries [2022/04/25 09:41] (current) – add alternative command to parse ips antisa | ||
|---|---|---|---|
| Line 18: | Line 18: | ||
| do a lookup with '' | do a lookup with '' | ||
| - | for ip in $(cat list);do whois $ip |awk -F: '/Country/ {print $2}'| sort;done > sorted1.txt | + | for ip in $(cat list);do whois $ip |awk -F: '/country/ {print $2}'| sort;done > sorted1.txt |
| Then show sorted and aggregated. | Then show sorted and aggregated. | ||
| cat sorted1.txt |sort|uniq -c | cat sorted1.txt |sort|uniq -c | ||
| + | |||
| + | If you get an error like: | ||
| + | No whois server is known for this kind of object. | ||
| + | |||
| + | Could be the input file [[https:// | ||
| + | |||
| + | while IFS=$' \t\r\n' | ||
| ====== Tested on ====== | ====== Tested on ====== | ||
| - | * | + | * Ubuntu 20.04 |
| ====== See also ====== | ====== See also ====== | ||
wiki/whois_lookup_list_ips_find_countries.1650875209.txt.gz · Last modified: by antisa
