libloc
comes with a command line tool which
makes it easy to test the library or integrate it into
your shell scripts.
location(8)
knows a couple of commands
to retrieve country or Autonomous System of an IP address
and can generate lists of networks to be imported into
other software.
Although this is not the fastest way to lookup a large number
of IP addresses, location(8)
is versatile
and very easy to use.