SHIFT(1)

NAME
shift - shift positional parameters

SYNOPSIS
shift [n]

DESCRIPTION

shift is a shell special built-in that shifts the positional parameters to the left by the number of places defined by n, or 1 if n is omitted. The number of positional parameters remaining will be reduced by the number of places that are shifted.

If n is given, it will be evaluated as an arithmetic expression to determinate the number of places to shift. It is an error to shift more than the number of positional parameters or a negative number of places.

EXIT STATUS

0   The positional parameters were successfully shifted.

>0  An error occurred.

SEE ALSO

set(1)

AUTHOR
David J. Korn, et. al.

COPYRIGHT
2019, David J. Korn, et.al.