使用while多个测试命令

5年以前  |  阅读数:472 次  |  编程语言:Shell 
#!/bin/bash

#testing a multicommand while loop

var1=10
while echo $var1
    [ $var1 -ge 0 ]
do  
    echo 'This is inside the loop'
    var1=$[ $var1 - 1 ]
done

Copyright© 2013-2020

All Rights Reserved 京ICP备2023019179号-8