Is it possible to export
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.
You can always do this, but it's ugly (and I'm curious):
export FOO
#...
_FOO=$FOO
unset FOO
FOO=$_FOO
Answers about other shells also accepted.