Bash之until循环

简介:

    until循环和while相反,表示条件满足时结束。

如:

#!/bin/bash

a=10

until [ $a -eq 20 ]

do

  echo $a

((a++))

done



本文转自 zengwj1949 51CTO博客,原文链接:http://blog.51cto.com/zengwj1949/1919397
相关文章
|
9月前
|
存储 Shell 索引
如何在Bash中使用For循环和数组?
如何在Bash中使用For循环和数组?
170 0
|
2月前
|
Shell
在Shell(如Bash)中,`while`循环
在Shell(如Bash)中,`while`循环
57 2
|
Java Shell Linux
如何在 Linux 中使用 Bash For 循环
如何在 Linux 中使用 Bash For 循环
107 0
|
Shell 容器 Docker