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

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"
主站蜘蛛池模板: 锦州市| 宝坻区| 宜兴市| 上思县| 九龙县| 梁平县| 栖霞市| 武川县| 格尔木市| 南溪县| 双牌县| 五大连池市| 永平县| 无棣县| 屯门区| 扎鲁特旗| 博野县| 噶尔县| 德安县| 荥经县| 定兴县| 忻城县| 大庆市| 汶上县| 通海县| 孟村| 玉环县| 钦州市| 阳信县| 滕州市| 繁峙县| 博爱县| 台江县| 勐海县| 桓台县| 灵宝市| 云霄县| 大埔县| 新宁县| 莲花县| 江山市|