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.

|<br />

|<br />

|<br />

|<br />

sh<br />

shell environment starts as a duplicate, the value of the ENV environment variable<br />

is not run. Changes made to a child shell environment do not affect the shell<br />

environment.<br />

<strong>Command</strong> substitutions (such as $command), commands within parentheses (such<br />

as (command)), and commands to be run asynchronously (such as command&)—all<br />

run in child shell environments. Each command in a pipeline (such as “command |<br />

command”) runs in a child shell environment, unless the pipecurrent shell option is<br />

in effect. If pipecurrent is set on (with set -o pipecurrent or set -P), then the last<br />

command of the pipeline is executed in the current shell environment.<br />

Shell commands also run in a separate environment that does not affect the shell<br />

environment, except for certain built-in commands (for example, cd and umask)<br />

that explicitly alter the shell environment. The environment of a shell command is<br />

set up by the shell to include the following:<br />

v Open files, subject to redirection.<br />

v Working directory (see cd).<br />

v File creation mask (see umask).<br />

v Traps; traps caught by the shell are set to default values and traps ignored by<br />

the shell are ignored by the command.<br />

v Variables defined inside the shell and having the export attribute.<br />

Built-in <strong>Command</strong>s<br />

This topic lists the commands that are built into the shell. Such commands are built<br />

into the shell to increase performance of shell scripts or to access the shell’s<br />

internal data structures and variables. These internal commands are designed to<br />

have semantics indistinguishable from external commands.<br />

: cd exit let pwd test unset<br />

. chmod export link r times wait<br />

[ chown false ln read trap whence<br />

[[ comm fc login readonly true writedown<br />

alias command functions ls return type<br />

autoload continue getopts mkdir rm typeset<br />

basename cp history mv set ulimit<br />

bg echo integer newgrp shift umask<br />

break eval jobs print stop unalias<br />

cat exec kill printf suspend unlink<br />

P<strong>OS</strong>IX.2 recognizes a subset of these commands as special built-ins. Syntax errors<br />

in special built-in commands may cause a shell executing that command to<br />

terminate, while syntax errors in regular built-in commands will not cause the shell<br />

executing that command to terminate. If a special built-in command encountering a<br />

syntax error does not terminate the shell, its exit value is nonzero.<br />

Also, shell variable assignments included on shell command lines that invoke<br />

special built-in commands remain in effect after the built-in command completes;<br />

this is not the case with regular built-in commands or other utilities.<br />

The special built-in commands are:<br />

: continue exit readonly shift unset<br />

. eval export return trap<br />

break exec set typeset<br />

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