title: How do I loop two files set in bash?
body: <p>I have two set of files. Lets say 10 files. I am trying to access two files in order. They always should go in pair.</p>
  
  <pre><code>#p1.01 p1.02 ... p1.05
  #p2.01 p2.02 ... p2.05
  
  for i j in p1.* and p2.*
  do
      script.pl -input1 $i -input2 $j
      # this will be
      # script.pl -input1 p1.01 -input2 p2.01
      # script.pl -input1 p1.02 -input2 p2.02
      # and so on until 5 pairs
  done
  </code></pre>