1 2 3 4 5 6
#!/bin/bash for i in "$@"; do printf '%s ' "$i" geoiplookup "$i" | grep 'GeoIP City Edition, Rev 1:' | sed 's#GeoIP City Edition, Rev 1: ##' done