mirror of
https://github.com/nilbuild/developer-roadmap.git
synced 2026-09-29 16:57:32 +08:00
Co-authored-by: nilbuild <4921183+nilbuild@users.noreply.github.com>
518 B
518 B
Shift
The shift command in shell scripting renames the command-line arguments. Specifically, it moves each argument one position to the left. The value of $2 becomes $1, the value of $3 becomes $2, and so on. The original value of $1 is lost. This is particularly useful when you need to process a variable number of arguments passed to a script.
Visit the following resources to learn more: