exportmark names for export |
KornShell Built-in |
export
[name[=value] ...]
export
-p
export
marks each name so that the current KornShell
exports it automatically to the environment of all commands executed from that
shell. Exported variables are thus available in the environment to all
subsequent commands. Several commands (for example,
cd
,
date
, and
vi
)
look at environment variables for configuration or option information.
Variable assignments of the form name=
value assign
value to name as well as marking name for export.
Calling export
without arguments presents a list, with
appropriate quoting of the names and values of all variables in the format:
If you re-input this format to another shell, variables are assigned appropriately but not exported. TheVariable="value"
-p
option lists
variables in a format suitable for re-input to the shell (see the description
of the -p
option).
-p
lists variables in the form
suitable for re-input to the shell.export name="value"
0
Successful completion.
1
Failure due to invalid command line argument.
2
Failure resulting in a usage message, usually due to invalid command line option.
export
is a special built-in command of the Bourne Shell and
KornShell on UNIX systems.