Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

sh (I)

SHIFT(I)  −  PWB/UNIX 8/21/73

NAME

shift − adjust Shell arguments

SYNOPSIS

shift

DESCRIPTION

Shift is used in Shell command files to shift the argument list left by 1, so that old $2 can now be referred to by $1 and so forth.  Shift is useful to iterate over several arguments to a command file.  For example, the command file

: loop
if $1x = x exit
pr −3 $1
shift
goto loop

prints each of its arguments in 3-column format.  Shift is executed within the Shell. 

SEE ALSO

sh (I)

BUGS

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026