title: Global environment variables in a shell script
body: <p>How to set a global environment variable in a bash script?</p>
  
  <p>If I do stuff like</p>
  
  <pre><code>#!/bin/bash
  FOO=bar
  </code></pre>
  
  <p>...or</p>
  
  <pre><code>#!/bin/bash
  export FOO=bar
  </code></pre>
  
  <p>...the vars seem to stay in the local context, whereas I'd like to keep using them after the script has finished executing.</p>