until command do Statement(s) to be executed until command is true donecommand 一般为条件表达式,如果返回值为 false,则继续执行循环体内的语句,否则跳出循环。
#!/bin/bash a=0 until [ ! $a -lt 10 ] do echo $a a=`expr $a + 1` done运行结果:
0 1 2 3 4 5 6 7 8 9
原文地址:http://blog.csdn.net/wu20093346/article/details/47253429