MPE/iX Shell and Utilities Reference Manual, Vol 2

sh(1) MPE/iX Shell and Utilities sh(1)
OLDPWD
contains the name of the previous directory. The cd command sets this variable.
PATH
contains a list of directories which constitute the search path for executable com-
mands. Directories in this list are separated with colons. sh searches each directory
in the order specified in the list until it finds a matching executable. If you want the
shell to search the current directory, put a null string in the list of directories (for
example, starting the list with a colon/semicolon tells the shell to search the current
directory first).
PID
contains the decimal value of the process ID of the parent of the shell. See ps(1).
PS1
contains the primary prompt string used when the shell is interactive. The default
value is a dollar sign followed by a space ($ ). The shell expands parameters before
the prompt is printed. A single exclamation mark (!) in the prompt string is replaced
by the command number from the history list (see fc(1)); for a real exclamation
mark in the prompt, use !!.
PS2
contains the secondary prompt, used when completing the input of such things as
reserved word commands, quoted strings, and here documents. The default value of
this variable is a greater than sign followed by a space (> ).
PS3
contains the prompt string used in connection with the select reserved word. The
default value is a number sign followed by a question mark and a space (#? ).
PS4
contains the prefix for traced commands with set –x. The default value is a plus
sign followed by a space (+ ).
PWD
contains the name of the current working directory. When the shell starts, the current
directory name is assigned to
PWD
unless the variable already has a value.
RANDOM
expands to a random integer. Assigning a value to
RANDOM
sets a new seed for the
random number generator.
REPLY
contains the user input from the select statement (see Command Syntax) The
read(1) command also sets this variable if no variable is specified.
SECONDS
contains elapsed time. The value of this variable grows by 1 for each elapsed second
of real time. Any value assigned to this variable sets the
SECONDS
counter to that
value; initially the shell sets the value to 0.
SHELL
contains the full path name of the current shell. It is not set by the shell, but is used
by various other commands to invoke the shell.
1-544 Commands and Utilities