Chapter 18. Control flow structures

All functional scripts need to have the ability to make decisions. They must also be able to process lists based on certain conditions. That’s what this chapter is all about; the building and implementation of control structures in scripts.

In this chapter we will cover:

  • exit statuses;

  • the while, for and until loops;

  • if then else statements;

  • making decisions in scripts; and

  • menus.

Get Linux and Unix Shell Programming 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.