title: Read tab-separated file line into array
body: <p>I would like to read a file into a script, line by line. Each line in the file is multiple values separated by a tab, I'd like to read each line into an array. </p>
  
  <p>Typical bash "read file by line" example;</p>
  
  <pre><code>while read line
  do
  echo $line;
  done &lt; "myfile"
  </code></pre>
  
  <p>For me though, myfile looks like this (tab separated values);</p>
  
  <pre><code>value1 value2 value3
  value4 value5 value6
  </code></pre>
  
  <p>On each iteration of the loop, I'd like each line to go into an array so I can</p>
  
  <pre><code>while read line into myArray
  do
   echo myArray[0]
   echo myArray[1]
   echo myArray[2]
  done &lt; "myfile"
  </code></pre>
  
  <p>This would print the following on the first loop iteration;</p>
  
  <pre><code>value1
  value2
  value3
  </code></pre>
  
  <p>Then on the second iteration it would print</p>
  
  <pre><code>value4
  value5
  value6
  </code></pre>
  
  <p>Is this possible? The only way I can see is to write a small function to break out the values manually, is there built in support in bash for this?</p>