File:  [Research Unix] / researchv10dc / dist / man / v4 / man1 / shift.1
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs
Tue Apr 24 17:21:34 2018 UTC (8 years, 1 month ago) by root
Branches: belllabs, MAIN
CVS tags: researchv10, HEAD
researchv10 Dan Cross

.th SHIFT I 8/21/73
.sh NAME
shift \*- adjust Shell arguments
.sh SYNOPSIS
.bd shift
.sh DESCRIPTION
.it Shift
is used in Shell command files to shift the
argument list left by 1,
so that old
.bd $2
can now be referred to by
.bd $1
and so forth.
.it Shift
is useful to iterate over several arguments
to a command file.
For example, the command file
.s3
.lp +5 0
: loop
.br
if $1x = x exit
.br
pr \*-3 $1
.br
shift
.br
goto loop
.s3
.i0
prints each of its arguments in 3-column format.
.s3
.it Shift
is executed within the Shell.
.sh "SEE ALSO"
sh (I)
.sh BUGS

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.