.TH export "" "" Command
.PC "Add a shell variable to the environment"
\fBexport [\fIname ...\fB]\fR
.br
\fBexport [\fIname\fB=\fIvalue\^\fB\]\fR
.PP
When the shell executes a command, it passes the command an
.IR environment .
By convention, the environment consists of assignments, each of the form
.IR "name=value" .
For example, typing
.DM
	export TERM=vt100
.DE
.PP
sets the environmental variable
.B TERM
to equal the string
.BR vt100 .
.PP
A command may look for
information in the environment or may simply ignore it.
In the above example,
a program that reads the variable
.B TERM
(such as \*(CO) will assume that
you are working on a DEC VT-100 terminal or one that emulates it.
.PP
The shell places the
.I name
and the value of each shell variable that appears in an
.B export
command into the environment of subsequently executed commands.
It does not place a shell variable into
the environment until it appears in an
.B export
command.
.PP
With no arguments,
.B export
prints the name and the value of each shell variable currently marked for
export.
.PP
The shell executes
.B export
directly.
.SH "See Also"
.Xr "commands," commands
.Xr "environ," environ
.Xr "exec," exec
.Xr "ksh," ksh
.Xr "sh" sh
