title: DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" How does that work?
body: <p>I need to get the path of the script. I can do that using <code>pwd</code> if I am already in the same directory, I searched online and I found this</p>
  <p><code>DIR=&quot;$( cd &quot;$( dirname &quot;${BASH_SOURCE[0]}&quot; )&quot; &amp;&amp; pwd )&quot;</code></p>
  <p>But I don't know how to use that.</p>