title: Bash shebang option -l
body: <p>I use a script, <code>test.sh</code>, written by someone else, the begins with a bash shebang:</p>
  
  <pre><code>#!/bin/bash -l
  ...
  echo TEST: $TEST
  </code></pre>
  
  <p>From what I could see, this has an effect on variables used inside the script:</p>
  
  <ul>
  <li>if I run <code>TEST=hey ./test.sh</code>, I can see <code>TEST: hop</code>, <code>hop</code> being the value of variable <code>TEST</code> in my <code>.bash_profile</code></li>
  <li>this is the same if I <code>export TEST=hey</code> before running the script</li>
  <li>but if I remove the <code>-l</code> flag, the same command returns <code>TEST: hey</code>, as I would have expected</li>
  </ul>
  
  <p>Can someone please explain this behaviour ? The help of bash did not... help.</p>