1.. default-role:: code
2
3:index:`shift` -- shift positional parameters
4=============================================
5
6Synopsis
7--------
8| shift [n]
9
10Description
11-----------
12`shift` is a shell special built-in that shifts the positional parameters
13to the left by the number of places defined by *n*, or `1` if *n* is
14omitted.  The number of positional parameters remaining will be reduced
15by the number of places that are shifted.
16
17If *n* is given, it will be evaluated as an arithmetic expression to
18determinate the number of places to shift.  It is an error to shift more
19than the number of positional parameters or a negative number of places.
20
21Exit Status
22-----------
23:0: The positional parameters were successfully shifted.
24
25:>0: An error occurred.
26
27See Also
28--------
29`set`\(1)
30