Back to Developer Roadmap

Script Arguments

src/data/roadmaps/shell-bash/content/[email protected]

4.0892 B
Original Source

Script Arguments

Script arguments are values passed to a shell script when it is executed. These arguments allow you to customize the script's behavior without modifying the script's code directly. They are accessed within the script using positional parameters like $1, $2, $3, and so on, where $1 represents the first argument, $2 the second, and so forth. The special variable $0 holds the name of the script itself, and $# contains the number of arguments passed.

Visit the following resources to learn more: