Closed urgordeadbeef closed 3 years ago
Hi @urgordeadbeef, I'm not sure of your use case, but you may be interested in a combination of mmdbinspect
and jq
, which will just say null
when the requested key doesn't exist:
$ mmdbinspect -db GeoIP2-City.mmdb 192.42.116.18 | jq -r '.[].Records[].Record.country.isocode'
null
When trying to exec
mmdblookup -i 192.42.116.18 -f ./GeoIP2-City.mmdb country iso_code
mmdblookup throwing following errorGot an error looking up the entry data - The lookup path does not match the data (key that doesn't exist, array index bigger than the array, expected array or map where none exists)
With any other ip work just fine, but this one always produce this error.