title: How can I submit two or more input files to a pipeline in a bash script?
body: <p>I have written a bash script that performs a series of bioinformatics tasks using various programs. I would like to know how to pass this script a string of filenames to perform the same analysis on consecutively. </p>
  
  <p>i.e. assuming I have something like:</p>
  
  <pre><code>name=a.txt
  echo "this is a test" &gt;&gt; $name
  echo "this is also a test" &gt;&gt; $name
  echo "this is still a test" &gt;&gt; $name
  </code></pre>
  
  <p>I thought I could do:</p>
  
  <pre><code>for i in 'b.txt c.txt d.txt'
      do
      name=$i
          echo "this is a loop test" &gt;&gt; $name
          echo "this is also a loop test" &gt;&gt; $name
          echo "this is still a loop test" &gt;&gt; $name
      done
  </code></pre>
  
  <p>to achieve the same sort of thing. but obviously this doesnt work. How may I achieve this?</p>
  
  <p>Thanks,</p>
  
  <p>Matt</p>