标签:style blog io color ar sp div on log
until [ condition ] # 和while相反,当 condition 条件成立时,就终止回圈, 否则就持续进行回圈的程序段 do #执行内容 done
until
read -p "Plz input a paramter": param
test $param = "end"
do
echo "$param"
done
user@ae01:~$ ./test.sh
Plz input a paramter:a
a
Plz input a paramter:b
b
Plz input a paramter:c
c
Plz input a paramter:end
user@ae01:~$
i=1 until [ "$i" -gt 5 ] do echo "$i" i=$(($i+1)) done
user@ae01:~$ ./test.sh 1 2 3 4 5 user@ae01:~$
标签:style blog io color ar sp div on log
原文地址:http://www.cnblogs.com/tannerBG/p/4057034.html