title: Parsing mysql output into bash variables is broken by white spaces
body: <p>I want to read all rows in a table and put them in individual variables in bash, but I'm having a problem when the cell entries have white spaces in them:</p>
  
  <pre><code>while read id name neighbourhood city
  do
          echo "ID: $id"
          echo "name: $name"
          echo "neighbourhood: $neighbourhood"
          echo "city: $city"
          echo -e "\n"
  done &lt; &lt;(echo "SELECT id, name, neighbourhood_id, city_id FROM households" | mysql -u kong -pHarald city_planner -h 0)
  </code></pre>
  
  <p>If the <code>name</code> is just a single word it all looks fine, but if it has three individual words separated by white space, it ends up as shown below:</p>
  
  <pre><code>...
  
  ID: 200
  name: Durek
  neighbourhood: 1
  city: 2
  
  
  ID: 201
  name: Kong
  neighbourhood: Harald
  city: Rex   1   2
  
  ...
  </code></pre>
  
  <p>How can I make the whole name end up in the name variable?</p>