- 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"
推薦閱讀
- Java語言程序設計
- Fundamentals of Linux
- Mastering Natural Language Processing with Python
- Java從入門到精通(第5版)
- 精通搜索分析
- Mastering Python Scripting for System Administrators
- UML+OOPC嵌入式C語言開發精講
- 深入淺出DPDK
- 深度學習:算法入門與Keras編程實踐
- QGIS:Becoming a GIS Power User
- 自然語言處理Python進階
- RESTful Java Web Services(Second Edition)
- 用案例學Java Web整合開發
- 微課學人工智能Python編程
- Go語言入門經典