Click to See Complete Forum and Search --> : export


Strogian
02-27-2002, 07:30 PM
What exactly does export do? I know the man page for bash says that it marks the variable for automatic export to future commands, or whatever. But what exactly is it exported to? (e.g. Will a perl script get the exported variables? How about a binary? Is that even possible?)

X_console
02-27-2002, 09:14 PM
Yes that's what it is. Exporting a variable makes it available to all programs you run.

SpinyNorman
02-27-2002, 09:49 PM
Originally posted by Strogian:
<STRONG>...But what exactly is it exported to?</STRONG> It is exported to the shell's "environment". There's a good explanation of environment variables in general in this article (http://www.linux-mag.com/2001-06/newbies_01.html). It discusses shell variables and their usage, including exporting, in a pretty clear and informative way.