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
- IP 
- 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:

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

:link: Download the CLI: