- Bash Cookbook
- Ron Brash Ganesh Naik
- 67字
- 2021-07-23 19:17:31
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"
推薦閱讀
- Mastering Ext JS(Second Edition)
- Spring技術內幕:深入解析Spring架構與設計
- Vue.js前端開發基礎與項目實戰
- Mastering Articulate Storyline
- Instant Typeahead.js
- Python 3網絡爬蟲實戰
- PostgreSQL 11從入門到精通(視頻教學版)
- JS全書:JavaScript Web前端開發指南
- Mastering KnockoutJS
- VMware虛擬化技術
- Oracle GoldenGate 12c Implementer's Guide
- 高效使用Greenplum:入門、進階與數據中臺
- Python第三方庫開發應用實戰
- Python實戰指南:手把手教你掌握300個精彩案例
- 嵌入式網絡編程