Extract IP, currency, symbol and flag from a bulk lookup using the IPinfo CLI

Using JQ and the IPinfo CLI you can bulk extract information from IP addresses.

ipinfo ► ipinfo 175.33.51.74
Core
- IP           175.33.51.74
- Anycast      false
- Hostname     n175-33-51-74.meb2.vic.optusnet.com.au
- City         Melbourne
- Region       Victoria
- Country      Australia (AU)
- Flag         🇦🇺
- Currency     AUD ($)
- Location     -37.9040,145.0071
- Organization AS4804 Microplex PTY LTD
- Postal       3186
- Timezone     Australia/Melbourne

Extracting the currency, the currency symbol and their flag from a list of IP addresses (ips.txt)

ipinfo bulk ips.txt | jq -r '.[] | "\(.ip)'"'"'s Currency = \(.country_currency["code"]) \(.country_currency["symbol"]) \(.country_flag["emoji"])"'

Try it out yourself with the ips.txt file here:

174.83.177.70
168.235.145.68
83.185.84.82
97.161.149.198
108.43.228.91
73.43.14.188
231.249.218.166
186.249.168.77
34.170.32.180

Or, you can use ipinfo randip to generate a random list of IP addresses.

:link: Download the CLI: