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.

|<br />

|<br />

|<br />

Localization<br />

Exit Values<br />

Portability<br />

_<strong>UNIX</strong>03<br />

For more information about the effect of _<strong>UNIX</strong>03 on this command, see<br />

Appendix N, “<strong>UNIX</strong> shell commands changed for <strong>UNIX</strong>03,” on page 943.<br />

tr uses the following localization environment variables:<br />

v LANG<br />

v LC_ALL<br />

v LC_COLLATE<br />

v LC_CTYPE<br />

v LC_MESSAGES<br />

v LC_SYNTAX<br />

v NLSPATH<br />

See Appendix F for more information.<br />

0 Successful completion<br />

1 Failure because of unknown command line option, or too few arguments<br />

P<strong>OS</strong>IX.2, X/Open Portability Guide.<br />

tr is downward–compatible with both the <strong>UNIX</strong> Version 7 and <strong>System</strong> V variants of<br />

this command, but with extensions (C escapes, handles ASCII NUL,<br />

internationalization).<br />

trap — Intercept abnormal conditions and interrupts<br />

Format<br />

Description<br />

trap [’handler’] [event ...]<br />

trap intercepts certain kinds of exception conditions. Any signal may be intercepted<br />

by specifying an event corresponding to the signal number.<br />

With an event of ERR, trap invokes the handler after receiving any having a nonzero<br />

exit status. The exception to this is conditions in if, while, and until statements.<br />

This trap is not inherited within a function.<br />

With a trap number of 0 or EXIT, trap invokes the handler during exit from the shell.<br />

Within a function, it is invoked during exit from the function.<br />

Any other event corresponds to a signal number or signal name. (See kill for a<br />

table of valid signal numbers and their names.) If a signal is being ignored when<br />

you enter the shell, the shell continues to ignore it without regard to any traps.<br />

Because system initialization sets the value of the SIGIOERR signal to ignore, this<br />

signal cannot be set by trap.<br />

The handler argument is a command list. It is usually more than one word, and so<br />

you must quote it to appear as a single argument. It is scanned when the trap<br />

function is initially invoked. When the trap condition is raised, the shell scans the<br />

Chapter 2. Shell command descriptions 707<br />

tr

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

Saved successfully!

Ooh no, something went wrong!