title: Get the name of the directory where a script is executed
body: <p>I have some script, that uses files in directories around it. It uses  </p>
  
  <pre><code>dirname $0
  </code></pre>
  
  <p>command.
  It should work from any directory where I run this script, but when I run a symbolic link that points to that script I get the path of symbolic link.  So I get the output of dirname rather than the path of the script itself.  </p>
  
  <p>Any one know a way to get the path of where the script is run?  </p>