December 1999
Beginner
528 pages
11h 10m
English
At the beginning of this chapter, I said that there were four types of variables, local and environment, plus two other types considered special because they are readonly. These are positional and special variable parameters. Let’s look at the positional variables.
When you want to pass information to a shell script, you can access this information using positional parameters. A number references each parameter passed to a script. You can pass as many arguments as you like but you can only access the first nine parameters, though you can get around this limitation using the command shift. We will see shift in action later on in the book. The parameters start at one and finish at nine; each parameter you wish ...
Read now
Unlock full access