title: Parsing only the IP addresses in a file
body: <p>I have the following <code>/etc/hosts</code> file:</p>
  
  <pre><code># The following lines are desirable for IPv6 capable hosts
      ::1 ip6-localhost ip6-loopback
      fe00::0 ip6-localnet
      ff00::0 ip6-mcastprefix
      ff02::1 ip6-allnodes
      ff02::2 ip6-allrouters
      ff02::3 ip6-allhosts
  
      ## vagrant-hostmanager-start
      10.60.63.6  dgnode-1 dgnode-1.dg.local
      10.144.64.75    dgnode-2 dgnode-2.dg.local
      10.226.98.24    namenode namenode.dg.local
      ## vagrant-hostmanager-end
  </code></pre>
  
  <p>When I execute the following <code>awk</code> command I get:</p>
  
  <pre><code>awk 'NR==1{ips=$1} NR&gt;1{ips=ips ", " $1} $2=="namenode"{nn=$1} END{
     printf "/opt/mapr/server/configure.sh -C %s -Z %s -HS %s -N MyCluster\n",
            ips, nn, nn}' /etc/hosts 
  </code></pre>
  
  <p>I'm getting:</p>
  
  <pre><code>/opt/mapr/server/configure.sh -C 127.0.0.1, , #, ::1, fe00::0, ff00::0, ff02::1, ff02::2, ff02::3, , ##, 10.60.63.6, 10.144.64.75, 10.226.98.24, ##, -Z 10.226.98.24 -HS 10.226.98.24 -N MyCluster
  </code></pre>
  
  <p>Instead of </p>
  
  <pre><code>/opt/mapr/server/configure.sh -C 10.60.63.6, 10.144.64.75, 10.226.98.24 -Z 10.226.98.24 -HS 10.226.98.24 -N MyCluster
  </code></pre>
  
  <p>Which is want I want. That's it, just the IP addresses, with the exception of <code>127.0.0.1</code>.How can I accomplish that? </p>