One? Using the FOR Loop statement
(1) Structure of the FOR statement: When using a For loop statement, you need to specify a list of possible values for a variable, repeating the same sequence of commands for each different value until the value of the variable is used up to the exit loop. (For tasks that need to be executed more than once, and each execution is just a different object, the other commands are the same.) )
For variable name in value list
Do
Command sequence
Done
II. Using the WHILE Loop statement
(1) While syntax structure: when using a while statement, you can repeatedly execute a sequence of commands based on a specific condition until the condition is no longer satisfied. (For cases where the number of cycles is required, the operand is numbered numerically and is repeated on a specific condition)
While condition test action
Do
Command sequence
Done
Iii. using the Case Branch statement
(1) The structure of the case Branch statement: very similar to the structure of a multi-branch if statement, except that the IF statement needs to judge many different conditions, whereas the case statement only determines the different values of a variable. (for multiple values for a variable, you need to execute a different command sequence for each of these values)
Shell Script (iii)