next up previous contents index
Next: The unalias Command Up: Shell Commands Previous: The shell Command   Contents   Index

The shift Command

The shift command facilitates handling of list variables in shell scripts.

shift [varname] [number]
If varname is the name of a list variable, it is shifted to the left by number elements, i.e., the number leftmost elements are removed. The default varname is argv, and the default number is 1.

Stephen R. Whiteley 2017-02-22