title: Running Executable from Shell Script
body: <p>I am having trouble launching an executable that I have created from a shell script.  I would like to automate testing by running the program many times with different command line options to verify it is working.</p>
  
  <p>When I type <code>echo $SHELL</code>, <code>/bin/sh</code> is displayed.</p>
  
  <p>The following is my shell script:</p>
  
  <pre><code>#!/bin/sh
  clear 
  echo "Running first test."
  ./myProgram
  exit 0
  </code></pre>
  
  <p>When I run the script (<code>sh myScript.sh</code>), with <code>myProgram</code> in the same directory, I see the following output:</p>
  
  <pre><code>Running first test.
  : not foundsh: line 4:
  </code></pre>
  
  <p>When executing the program <code>./myProgram</code>, it runs as expected with no command line options.</p>
  
  <p>I have also tried:
      myProgram
      ./myProgram &amp;
      myProgram &amp;
  based on answers to somewhat similar questions, but they all result in the above error message.</p>