O'Reilly logo

A Practical Guide to Red Hat® Linux® 8 by Mark G. Sobell

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Control Structures

The control flow commands alter the order of execution of commands within a shell script. The Bourne Again and Z Shells share a common syntax, whereas the TC Shell uses a different syntax (page 714). Control structures include the if…then, for…in, while, until, and case statements. In addition, the break and continue statements work in conjunction with the control flow structures to alter the order of execution of commands within a script.

if…then

The syntax of the if…then control structure is

							if test-command
							then
							commands
							fi
						

The bold words in the syntax description are the items you supply to cause the structure to have the ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required