title: Why is exported variable blank after script is over?
body: <p>I have a simple command in a Linux shell script (say foo.sh). In it I do this:</p>
  
  <pre><code>export INSTALL_DIR=/mnt/share/TEST_Linux
  </code></pre>
  
  <p>I run the script with:</p>
  
  <pre><code>&gt; sh foo.sh
  </code></pre>
  
  <p>When it finishes I try to get the variable but the value is blank.</p>
  
  <pre><code>&gt; echo $INSTALL_DIR
  </code></pre>
  
  <p>If I type the command directly the exported var becomes global to the opened terminal window. I'm using Ubuntu.</p>