官术网_书友最值得收藏!

Until loop

For completeness, we have included the until loop. It is not used very often and is almost the same as a do while loop. Notice that its condition and operation is consistent with incrementing a counter until a value is reached:

#!/bin/bash
CTR=1
until [ ${CTR} -gt 9 ]
do
echo "CTR var: ${CTR}"
((CTR++)) # Increment the CTR variable by 1
done
echo "Finished"
主站蜘蛛池模板: 大洼县| 辽阳市| 克山县| 吉林市| 胶州市| 佛坪县| 辽阳县| 芮城县| 法库县| 柘城县| 新田县| 萍乡市| 蒲江县| 陆河县| 马尔康县| 武冈市| 德庆县| 东莞市| 桓台县| 南城县| 桐城市| 北安市| 博客| 新野县| 韶关市| 晋中市| 庄浪县| 六枝特区| 泽州县| 黄大仙区| 友谊县| 长白| 京山县| 观塘区| 舟曲县| 台湾省| 固阳县| 太仓市| 女性| 涟水县| 海阳市|