Linux Shell Scripting Tutorial (LSST) v1.05r3
Chapter 3: Shells (bash) structured Language Constructs
Loop defined as:
"Computer can repeat particular instruction again and again, until particular condition satisfies. A group of instruction that is executed repeatedly is called a loop."
Note that in each and every loop,
(a) First, the variable used in loop condition must be initialized, then execution of the loop begins.
(b) A test (condition) is made at the beginning of each iteration.
(c) The body of loop ends with a statement that modifies the value of the test (condition) variable.
|Multilevel if-then-else|| |