title: Execute bash and sh file on Mac without writing extension
body: <p>I have a <code>.sh</code> file and I want to execute it from shell without writing the extension.
  What I did:</p>
  
  <ul>
  <li>I created a directory and added it to $PATH</li>
  <li>I gave to the file.sh chmod 711</li>
  <li>and the file contain #!/bin/sh (I tried also bash).</li>
  </ul>
  
  <p>However when I try to execute <code>myscript</code> without sh  I get command not found
  <strong>while</strong> if I try with <code>myscript.sh</code> I get the right result.</p>
  
  <p>How could I do?</p>
  
  <p>I read also: <a href="https://stackoverflow.com/questions/733824/how-to-run-a-sh-script-in-an-unix-console-mac-terminal">How to run a shell script on a Unix console or Mac terminal?</a> and <a href="https://stackoverflow.com/questions/2999448/executing-shell-script-without-calling-sh-implicitly">executing shell script without calling sh implicitly</a> but no solution</p>
  
  <p><strong>Result of ls -l</strong></p>
  
  <pre><code>ls -l /Users/Mitro/scripts
  total 8
  -rwx--x--x  1 Mitro  staff  22 Nov 26 10:25 myscript.sh
  
  echo $PATH
  /usr/local/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/Users/Mitro/scripts
  </code></pre>