Name

shift

Synopsis

shift [n]

Shift positional arguments (e.g., $2 becomes $1). If n is given, shift to the left n places; otherwise n is assumed to be 1. Used in while loops to iterate through command-line arguments.

Get Linux in a Nutshell, 6th Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.