title: bash for loop using variables with spaces
body: <p>I am on Mac OS 10.7.x and needing to interrogate network services to report on which interfaces are defined against a service and which dns servers are set against each.</p>
  
  <pre><code>servicesAre=`networksetup -listallnetworkservices | tail -n +2 | sed 's/.*/"&amp;"/'` ; 
  for interface in $servicesAre ; do 
        printf " \nFor $interface we have:\n \n" ; 
        networksetup -getdnsservers $interface ; 
  done
  </code></pre>
  
  <p>My problem is the spaces in the initial variable list of interfaces:</p>
  
  <pre><code>"USB Ethernet"  
  "Display Ethernet"  
  "Wi-Fi"  
  "Bluetooth PAN"
  </code></pre>
  
  <p>How do I pass those through?</p>