title: Is it possible to use a Bash script to process an input file 5 rows at a time?
body: <p>If an input file "input.txt" contains 10 rows of echo commands.  Is it possible to process 5 rows at a time?  Once a row completes its command run the next row in the file.</p>
  
  <p>e.g.</p>
  
  <pre><code>$ cat input.txt
  echo command 1
  echo command 2
  echo command 3
  echo command 4 
  echo command 5
  echo command 6
  echo command 7
  echo command 8
  echo command 9 
  echo command 10
  </code></pre>
  
  <p>I realize these are simple commands, the ultimate idea is to run up to 5 rows of commands at a time and once each once completes successfully, a new command from the input file would start.</p>