Shell script until statement. IFS field separator and break continue application

until statement

until 条件测试操作
do
    命令序列
done

Test a certain condition repeatedly, and execute it repeatedly if the condition is not established.
On the contrary, once the condition is established, the execution will end.

Insert picture description here
Insert picture description here
Insert picture description here
Double loop
Insert picture description here
Insert picture description here

break

break out of a single loop
Insert picture description here
Insert picture description here
break out of a double loop
Insert picture description here
Insert picture description here

continue

Abort a command in a loop, but not completely abort the entire command
Insert picture description here
Insert picture description here

IFS field separator

Contains spaces, tabs, and newlines by default

 set | grep IFS

Insert picture description here
Insert picture description here

Insert picture description here
Insert picture description here
Insert picture description here

Guess you like

Origin blog.csdn.net/MQ107/article/details/114656119