Chapter Summary

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 Bourne Again and Z Shell 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.

The test builtin can evaluate an expression in a shell script. The expression is ...

Get A Practical Guide to Red Hat® Linux® 8 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.