export

Set an environment variable. The supplied names are marked for automatic export to the environment of subsequently executed commands.

Syntax
      export [-fn] [name[=word]] ...
export -p Key -f The names refer to functions. word The value of the variable is set to word. -n Remove the export property from each name. -p Print a list of all the names exported in this shell. This is also the default action if no name is given

export returns an exit status of 0 unless an invalid option is encountered, one of the names is not a valid shell variable name, or -f is supplied with a name that is not a function.

export is a bash built in command. (in tcsh you would use setenv instead)

"Power tends to corrupt, absolute power corrupts absolutely" - Lord Acton

Related:

set - Set a shell variable
unset - Remove variable or function names



Back to the Top

© Copyright SS64.com 1999-2012
Some rights reserved