What are control structures?
syntactic structures that control how and when other statements are executed
What are the two basic types of control structures?
conditionals and loops
What is the basic format of the
if ... then construct?
How is the command that follows
if used to determine whether or not the statements between the
fi keywords are executed?
if the command returns an exit status of 0 the statements are executed
What does an exit status of 0 mean?
that the command that returned the status code ran without error
What are the two keywords that surround the statements inside an
then keyword appear on the same line as
yes, but only if it is separated from it by a semicolon (;)
What does the
test command do?
analyze a logical expression and return an exit status that tells
whether the expression is true or false
What is the value of the exit status returned by
test to indicate that the expression is true?
Does the command that follows
if need to be
no, it can be any command that returns an exit status