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.

shift<br />

Description<br />

Examples<br />

Usage Note<br />

Localization<br />

Exit Values<br />

Messages<br />

Portability<br />

shift renames the positional parameters so that i+nth positional parameter becomes<br />

the ith positional parameter, where n is the value of the given arithmetic expression.<br />

If you omit expression, the default value is 1. The value of expression must be<br />

between zero and the number of positional parameters ($#), inclusive. The value of<br />

$# is updated.<br />

shift in the tcsh shell<br />

Without arguments, shift discards argv[1] and shifts the members of argv to the<br />

left. It is an error for argv not to be set or to have less than one word as value.<br />

With variable, shift performs the same function on variable. See “tcsh — Invoke a<br />

C shell” on page 626.<br />

The commands:<br />

set a b c d<br />

shift 2<br />

echo $*<br />

produce:<br />

c d<br />

shift is a special built-in shell command.<br />

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

v LANG<br />

v LC_ALL<br />

v LC_MESSAGES<br />

v NLSPATH<br />

See Appendix F for more information.<br />

0 Successful completion<br />

1 Failure because the expression had a negative value or was greater than<br />

the number of positional parameters.<br />

Possible error messages include:<br />

bad shift count expr<br />

You specified an expression that did not evaluate to a number in the range<br />

from 0 to the number of remaining positional parameters.<br />

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

Allowing an expression, rather than just a number, is an extension found in the<br />

z/<strong>OS</strong> <strong>UNIX</strong> <strong>System</strong> <strong>Services</strong> shell (a KornShell).<br />

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