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

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"
主站蜘蛛池模板: 余庆县| 茶陵县| 大名县| 蓝山县| 富顺县| 九江市| 班玛县| 宕昌县| 浪卡子县| 华安县| 交城县| 苗栗县| 个旧市| 铜梁县| 蒙城县| 舟曲县| 泸州市| 莒南县| 三河市| 永新县| 鸡泽县| 嘉峪关市| 调兵山市| 德昌县| 开原市| 宜良县| 大同县| 宁乡县| 遂宁市| 苗栗县| 交城县| 海宁市| 吉安县| 黎川县| 会昌县| 辽宁省| 宣武区| 通辽市| 辉南县| 浦东新区| 新干县|