December 2008
Intermediate to advanced
320 pages
6h 45m
English
Many scripts require a minimum set of input parameters or defined variables in order to run correctly. For example, they may contain customizable values used for configuration purposes, which are initially set to default values. In this chapter we'll look at various methods of testing variables and setting default values. The differences between many of these syntactical variants are subtle, but each is useful for working with undefined variables, setting variable defaults, and debugging.
All of the methods in this chapter check the state of a given variable and assign or substitute a value based on that assessment. The point here is to provide a variety of ways to perform these types of tasks. ...