Chapter 12. More on Parameters

In this chapter, you'll learn some more about parameters. Technically, parameters include the arguments passed to a program (the positional parameters), the special shell variables such as $# and $?, and ordinary variables, also known as keyword parameters.

Positional parameters cannot be assigned values directly; however, they can be reassigned values with the set command. Keyword parameters are assigned values simply by writing

variable=value

The format is a bit more general than that shown; actually, you can assign several keyword parameters at once using the format

variable=value variable=value ...

Get Unix Shell Programming, Third Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.