title: IP address and Country on same line with AWK
body: <p>I'm looking for a one-liner that based on a list of IPs will append the country from where the IP is based</p>
  
  <p>So if I have this as and input:</p>
  
  <pre><code>87.229.123.33
  98.12.33.46
  192.34.55.123
  </code></pre>
  
  <p>I'd like to produce this:</p>
  
  <pre><code>87.229.123.33 - GB
  98.12.33.46 - DE
  192.34.55.123 - US
  </code></pre>
  
  <p>I've already got a script that returns the country for IP but I need to glue it all together with awk, so far this is waht I came up with:</p>
  
  <pre><code>$ get_ips | nawk '{ print $1; system("ip2country " $1) }'
  </code></pre>
  
  <p>This is all cool but the ip and the country are not displayed on the same line, how can I merge the system output and the ip on one line ?</p>
  
  <p>If you have a better way of doing this, I'm open to suggestions.</p>