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 ...

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

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.