2. Case statement
Only one conditional relationship is judged
Grammar:
Case¢ variable name in
"Value 1")
Procedure 1
;;
"Value 2")
Procedure 2
;;
*)
Procedure 3
;;
Esac
3. For loop
1) Syntax: (Assigning a value to a variable executor, several values are executed several times)
For variable name in value 1 value 2 value 3 ....
Do
Program
Done
2) Syntax: addition with the calculation of the loop control condition is established when the following program is executed (note: Double brackets are used to add and subtract algorithms, double brackets and
There should be a space between the intermediate values)
for (initial value; cyclic control condition; variable change)
Do
Program
Done
4. While loop when conditional judgment is established, execute the following procedure
Grammar:
While [conditional-judging]
Do
Program
Done
4, until cycle when the conditional judgment does not immediately execute the following program
Grammar:
Until [conditional judging type]
Do
Program
Done
Shell programming--looping statements