March 2002
Beginner
504 pages
10h 47m
English
The shell defines several special variables that are relevant to option parsing and command execution. Table 13.1 describes all of these special variables.
| Variable | Description |
|---|---|
| $0 | The name of the command being executed. For shell scripts, this is the path which invoked it. |
| $n | These variables correspond to the arguments with which a script was invoked. Here n is a positive decimal number corresponding to the position of an argument (the first argument is $1, the second argument is $2, and so on). |
| $# | The number of arguments supplied to a script. |
| $* | All the arguments are double quoted. If a script receives two arguments, $* is equivalent to $1 $2. |
| $@ | All the arguments are individually double quoted. ... |
Read now
Unlock full access