Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
The shell is a programming language. Programs written in this language are called shell scripts, or simply scripts. Shell scripts provide the decision and looping control structures present in high-level programming languages while allowing easy access to system utilities and user programs. Shell scripts can also use functions to modularize and simplify complex tasks.
The control structures that use decisions to select alternatives are if...then, if...then...else, and if...then...elif. The case control structure provides a multiway branch and can be used when you want to express alternatives, using a simple pattern-matching syntax.