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 ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access