linux-tutorial/codes/shell/demos/statement/until-demo.sh

14 lines
125 B
Bash

#!/usr/bin/env bash
x=0
until [[ ${x} -ge 5 ]]; do
echo ${x}
x=`expr ${x} + 1`
done
# Output:
# 0
# 1
# 2
# 3
# 4