title: Execute command on all files in a directory
body: <p>Could somebody please provide the code to do the following:
  Assume there is a directory of files, all of which need to be run through a program. The program outputs the results to standard out. I need a script that will go into a directory, execute the command on each file, and concat the output into one big output file.</p>
  
  <p>For instance, to run the command on 1 file:</p>
  
  <pre><code>$ cmd [option] [filename] &gt; results.out
  </code></pre>