Linux shell programming ---- loop structure 1 for loop 1 for loop is a common structure in Linux Shell. A for loop has three structures. One is a list for loop, the second is a for loop without a list, and the third is a C-style for loop. 2 list for loop for variable in list do statement done 3 for loop for variable do statement done 4 class C style for (expr1; expr2; expr3 )) do statement done 2 while loop 1 while loop structure while expression do statement done 3 until loop 1 when executing while LOOP 1 as long as the expression exit status is 0, it will always execute the loop body. The until command is similar to the while command, but the difference is that when the exit status of the expression in the until loop is not 0, the loop body will always be executed. 2 until structure the untile expression do statement done 4 loop control symbol 1 break statement can be applied in for, while and until loop statements for forced loop, that is, ignore the limitations of any other statements and loop conditions in the loop body. 2. The continue loop controller is used in the for, while, and until statements to allow the script to skip the subsequent statements and execute the next loop.