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

如:

#!/bin/bash

a=10

until [ $a -eq 20 ]

do

  echo $a

((a++))

done