8. 'Round and 'Round She Goes
In this chapter you’ll learn how to set up program loops. These loops will enable you to execute a set of commands either a specified number of times or until a specific end condition is met.
The three built-in looping commands for shell programming are
for
while
until
You’ll learn about each one of these loops in separate sections of this chapter.
The for Command
The for
command is used to execute one or more commands ...
Get Shell Programming in Unix, Linux and OS X, Fourth Edition 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.