title: Using dot or "source" while calling another script - what is the difference?
body: <p>Let's take a little example:</p>
  <pre><code>$ cat source.sh
  #!/bin/bash
  echo &quot;I'm file source-1&quot;
  
  . source-2.sh
  </code></pre>
  <p>And:</p>
  <pre><code>$ cat source-2.sh
  #!/bin/bash
  echo &quot;I'm file source-2&quot;
  </code></pre>
  <p>Now run:</p>
  <pre><code>$ ./source.sh
  I'm file source-1
  I'm file source-2
  </code></pre>
  <p>If I'll change the call of the second file in first:</p>
  <pre><code>$ cat source.sh
  #!/bin/bash
  echo &quot;I'm file source-1&quot;
  
  source source-2.sh
  </code></pre>
  <p>It will have the same effect as using <code>dot</code>.</p>
  <p>What is difference between these methods?</p>