易百教程

12、shell脚本中while循环的语法是什么?

while 循环用于多次重复其命令块。 它与 for 循环不同,它迭代直到 while 条件不再为真。
语法:

while [ test_condition ]  
do  
commands...  
done