Shell programming constructs
The shell programming language has
several constructs that give added
flexibility to your programs:
-
Comments
let you document
the function of a program.
-
The
here document
allows you to include,
within the shell program itself,
lines to be redirected
as input to some command in the shell program.
-
The
exit
command
lets you terminate a program at a point other
than the end of the program and use return codes.
-
The
looping
constructs, for and while,
allow a program to iterate
through groups of commands in a loop.
-
The
conditional
control commands,
if
and
case,
execute a group of commands
only if a particular set of conditions is met.
-
The
break
command allows a program
to exit unconditionally from a loop.
Next topic:
Comments
Previous topic:
Assigning values with positional parameters
© 2005 The SCO Group, Inc. All rights reserved.
SCO OpenServer Release 6.0.0 -- 02 June 2005