This is an old revision of the document!


The export builtin command

export [-fn] [NAME[=VALUE] ...]
export -p

The export builtin command is used to mark variables or functions referenced by NAME for automatic export to the environment. If NAME is a shell variable, a value VALUE can be assigned before exporting it.

Options

Option Description
-f refer to shell functions
-n remove the export property from any referenced NAME
-p print all exported variables, with -f, print all exported functions - all in a format re-usable as input

An argument of -- disables further option processing.

Return status

Status Reason
0 no error
!=0 invalid option
!=0 a given NAME is invalid

export DISPLAY=":0"

  • in POSIX┬«, only the -p option is specified
  • in POSIX┬«, only variables (with value assignment) are to be exported, not shell functions
This website uses cookies for visitor traffic analysis. By using the website, you agree with storing the cookies on your computer.More information
You could leave a comment if you were logged in.
  • commands/builtin/export.1335091870.txt
  • Last modified: 2012/04/22 10:51
  • by thebonsai