CMDLINE="$@" echo "Before shift: $@" shift 2 echo "After shift 2: $@" set - 2 "$CMDLINE" echo "After unshift 2: $@"