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

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

sh<br />

Note: Shell variables that are exported are called ″Environment Variables″, and are<br />

made available in the environment of all commands run from the shell.<br />

Table 28 contains a list of built-in shell variables and also includes<br />

frequently-used environment variables. For more information on environment<br />

variables used by the C-RTL, see the z/<strong>OS</strong> XL C/C++ Programming Guide. A<br />

list of other environment variables can be found in z/<strong>OS</strong> <strong>UNIX</strong> <strong>System</strong><br />

<strong>Services</strong> Planning.<br />

Table 28 lists frequently-used shell variables and their purposes.<br />

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

Variable Purpose<br />

_ (Underscore) For every command that is run as a child of the shell,<br />

sh sets this variable to the full pathname of the executable file and<br />

passes this value through the environment to that child process.<br />

When processing the MAILPATH variable, this variable holds the<br />

value of the corresponding mail file.<br />

~ (Tilde) expands to value of the HOME directory.<br />

_<strong>UNIX</strong>03 When _<strong>UNIX</strong>03 is set to YES, the utilities that have implemented<br />

support for the <strong>UNIX</strong>03 specification will conform to the <strong>UNIX</strong>03<br />

specification. This variable is only needed when the syntax or<br />

behavior of <strong>UNIX</strong>03 conflicts with the existing implementation.<br />

Rule: The value YES must be specified in uppercase.<br />

CDPATH Contains a list of directories for the cd command to search.<br />

Directory names are separated with colons. CDPATH works like the<br />

PATH variable.<br />

COLUMNS Used by several commands to define the width of the terminal<br />

output device.<br />

EDITOR Enables the corresponding editing mode (see set and shedit) when<br />

using vi, emacs, or gmacs.<br />

ENV Contains the path name of a setup script that contains commands<br />

and aliases.<br />

When you invoke sh as a login shell, the ENV script is run after the<br />

login profiles (/etc/profile, $HOME/.profile), before the shell<br />

accepts commands. For other sh invocations, the ENV script is run<br />

before the shell accepts commands. It is typically used to define<br />

shell options, functions and aliases.<br />

sh performs parameter substitution on this value and uses the<br />

results as the name of a setup script. This script is run in the<br />

current shell environment. The ENV variable is usually set in your<br />

.profile.<br />

ERRNO Contains the system error number of the most recently failed<br />

system call. The shell sets this variable only for errors that occur in<br />

the current environment. Assigning a value of 0 to this variable<br />

clears it.<br />

FCEDIT Contains the name of the default editor for the fc command. If this<br />

variable is not set, the default is the ed command.<br />

570 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!