title: Parallelizing a while loop with arrays read from a file in bash
body: <p>I have a while loop in Bash handled like this:</p>
  
  <pre><code>while IFS=$'\t' read -r -a line;
  do
      myprogram ${line[0]} ${line[1]} ${line[0]}_vs_${line[1]}.result;
  done &lt; fileinput
  </code></pre>
  
  <p>It reads from a file with this structure, for reference:</p>
  
  <pre><code>foo   bar
  baz   foobar
  </code></pre>
  
  <p>and so on (tab-delimited).</p>
  
  <p>I would like to parallelize this loop (since the entries are a lot and processing can be slow) using GNU parallel, however the examples are not clear on how I would assign each line to the array, like I do here.</p>
  
  <p>What would be a possible solution (alternatives to GNU parallel work as well)?</p>