title: Shell script working fine without shebang line? Why?
body: <p>I was writing a simple shell script and found out that my shell script doesn't require shebang line</p>
  
  <pre><code>#!/bin/sh
  </code></pre>
  
  <p>If I give execute permissions to my script and execute using <code>./myscript.sh</code>. It runs fine.</p>
  
  <p>I am using <code>bash</code> shell and <code>/bin/sh</code> is actually pointing to <code>bash</code>.</p>
  
  <pre><code>lrwxrwxrwx 1 root root /bin/sh -&gt; bash
  </code></pre>
  
  <p>I know that shebang line is used to tell shell which interpreter to use for your rest of the script.</p>
  
  <p>If I miss shebang line in perl, give execute permissions and run <code>./myscript.pl</code>, it doesn't work.</p>
  
  <p>What's actually happening here? If I use <code>./</code>, When is shebang line actually needed?</p>