#!/usr/bin/env bash
:<<helpMsg
shift: shift [n]
Shift positional parameters.
Rename the positional parameters $N+1,$N+2 ... to $1,$2 ... If N is
not given, it is assumed to be 1.
Exit Status:
Returns success unless N is negative or greater than $#.
helpMsg
:<<EOF
1 2 3 4 5
test.sh 2 3 4 5 6
test.sh 3 4 5 6 7
test.sh 5 6 7 8 9
EOF
:<<test2
]
1 2 3 4 5
test.sh 2 3 4 5 6
test.sh 3 4 5 6 7
test.sh 5 6 7 8 9
test.sh 9 10 11 12
test2
echo $1 $2 $3 $4 $5
shift 1
echo $0 $1 $2 $3 $4 $5
shift
echo $0 $1 $2 $3 $4 $5
shift 2
echo $0 $1 $2 $3 $4 $5
shift 4
echo $0 $1 $2 $3 $4 $5