Does bash have a way to un-export a variable without unsetting it? : <p>Is it possible to <code>export</code> a variable in Bash, then later un-export it, without unsetting it entirely? I.e. have it still available to the current shell, but not to sub-processes.</p>

<p>You can always do this, but it's ugly (and I'm curious):</p>

<pre><code>export FOO

#...

_FOO=$FOO
unset FOO
FOO=$_FOO
</code></pre>

<p>Answers about other shells also accepted.</p>
