You should be aware of two other statements: the
break statement and the
You can use the
break statement used to terminate an iteration loop, such as a
You can use
exit statements to exit a shell program. You can optionally use a number after
exit. If the current shell program has been called by another shell program, the calling program can check for the code (the
$status variable, depending on shell) and make a decision accordingly.