title: Writing a bash script to run a java program
body: <p>I'm rank new to bash thus the question.
  I've a java program that I've exported as a .jar.
  This file when run as </p>
  
  <pre><code>java -jar somefile.jar
  </code></pre>
  
  <p>goes into an infinite loop and awaits a file name. Based on the correct file path it generates an output.</p>
  
  <p>How do I write a bash script to do automated testing of this project. 
  I need the scrip to do the following -</p>
  
  <pre><code>Run the program, which is run the same command
  provide an array of 5 files as an input to the program
  For each file write the output to an log file.
  </code></pre>