shell脚本-循环语句的语法
1、常见的循环为 while do done,语法如下:while [ condition ]do 程序块done示例代码如下:

3、与上面循环判断条件有所不同, until do done 语法如下:until [ condition ]do 程序块done示例代码如下:

5、接下来看一个for..do...done 结构,语法如下:for (( 初始值; 判断值; 步长; ))do 程序块done示例代码如下:

7、另外,for循环在用于非数字方面还可以有这样的结构,语法如下:for var in {list[0]} {list[1]} ..do 程序块done和python中类似,示例代码如下:
