16.12.2012 Views

z/OS V1R9.0 UNIX System Services Command ... - Christian Grothoff

z/OS V1R9.0 UNIX System Services Command ... - Christian Grothoff

z/OS V1R9.0 UNIX System Services Command ... - Christian Grothoff

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

sh<br />

Table 28. Built-in Shell Variables (sh command) (continued)<br />

Variable Purpose<br />

MAILPATH Contains a list of mailbox files. This overrides the MAIL variable.<br />

The mailbox list is separated by colons. If any name is followed by<br />

?message or %message, sh displays the message if the<br />

corresponding file has changed. sh performs parameter and<br />

command substitution on message, and the variable _. (temporarily)<br />

expands to the name of the mailbox file. If no ?message or %<br />

message is present, the default message is you have mail in $_.<br />

MANPATH Contains a list of paths to search for man pages.<br />

MBOX Contains the pathname of your personal mailbox, usually<br />

$HOME/mbox, used to store messages that have been read from<br />

your system mailbox. This variable is usually set in your .profile.<br />

NLSPATH Specifies where the message catalogs are to be found.<br />

OLDPWD Contains the name of the directory you were previously working in.<br />

The cd command sets this variable.<br />

PATH Contains a list of directories that the system searches to find<br />

executable commands. Directories in this list are separated with<br />

colons. sh searches each directory in the order specified in the list<br />

until it finds a matching executable. If you want the shell to search<br />

the working directory, put a dot (.) or a null string in the list of<br />

directories (for example, to tell the shell to search the working<br />

directory first, start the list with a colon or semicolon).<br />

PPID Contains the decimal value of the process ID of the parent of the<br />

shell. If running in a child shell environment (see “Shell Execution<br />

Environments” on page 567), the PPID value is the same as the<br />

PPID value of the current shell.<br />

PS1 Contains the primary prompt string used when the shell is<br />

interactive.The default value is a dollar sign followed by a space<br />

($ ). The shell expands parameters before the prompt is printed. A<br />

single exclamation mark (!) in the prompt string is replaced by the<br />

command number from the history list; see the fc command. For a<br />

real exclamation mark in the prompt, use !!. This variable is usually<br />

set in your .profile.<br />

PS2 Contains the secondary prompt, or continuation prompt, used when<br />

completing the input of such things as reserved-word commands,<br />

quoted strings, and here documents. The default value of this<br />

variable is a greater than sign followed by a space (> ).<br />

PS3 Contains the prompt string used in connection with the select<br />

reserved word. The default value is a number sign followed by a<br />

question mark and a space (#? ).<br />

PS4 Contains the prefix for traced commands with set -x. The default<br />

value is a plus sign followed by a space (+ ).<br />

PWD Contains the name of the working directory. When the shell starts,<br />

the working directory name is assigned to PWD unless the variable<br />

already has a value.<br />

RANDOM Returns a random integer. Setting this variable sets a new seed for<br />

the random number generator.<br />

SECONDS Contains elapsed time. The value of this variable grows by 1 for<br />

each elapsed second of real time. Any value assigned to this<br />

variable sets the SECONDS counter to that value; initially the shell<br />

sets the value to 0.<br />

572 z/<strong>OS</strong> <strong>V1R9.0</strong> <strong>UNIX</strong> <strong>System</strong> <strong>Services</strong> <strong>Command</strong> Reference

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!