envvarstandard environment variables |
Miscellaneous Information |
export
NAME
=value
set
NAME
=value
echo
$NAME
TheNAME
=value
export
command built into the
MKS KornShell can be used to set the variable NAME
into the environment of every child process. The
set
command built into the shell does
the same. The echo
command prints the value of environment variable NAME
inside the MKS KornShell.
The shell maintains additional shell variables that are not exported to child processes; because these variables are not passed on, they are not environment variables.
COLUMNS
If you set this variable to a numeric value, various commands use its value as the width of the output device in columns. This overrides the default.
ENV
The value of this variable is the name of a file of MKS KornShell
commands, or else be null. When the MKS KornShell is invoked, the file
named by ENV
is executed before the MKS
KornShell does anything else. Thus your ENV
file may contain definitions of aliases, shell functions, and son on that
may be used by shell scripts. Note that your
ENV
file is executed, whether or not the MKS
KornShell is invoked as a login shell. This differs from older releases
of the MKS KornShell.
HASHBANG
If this variable is set then the #! feature of the MKS KornShell is enabled.
HOME
This variable is set by the shell's default startup files. It contains
the name of your home directory. Your home directory is the default
directory for the cd
command
built into the MKS KornShell.
LINES
If you set this variable to a numeric value, various commands use its value as the number of lines available on the output device. This overrides the default.
LOGNAME
This variable is set by the shell's default startup files. It holds the user name of the current user.
MAILER
For commands that send mail, this variable points at a mail delivery program. If this variable is not set, then the default mailer, mailx is invoked.
PATH
This variable is set to a default value when you start the
MKS KornShell. Normally, it is also set in your profile file. It lists
the directories that are to be searched to find commands, as described in
sh
.
SHELL
This variable contains the full path name of the current shell.
TERM
This variable contains the terminal type.
TMPDIR
By default, MKS Toolkit commands store temporary files under
/tmp
. To use a different directory for temporary files, set
TMPDIR
to the name of the directory you want
to use.
TZ
Commands that print times (and dates) use this variable to determine
the time zone. If the TZ
variable is left undefined, the
operating system's current time zone setting is used. See
timezone
for details.
timezone