shell/结构化命令/使用until命令.sh

22 lines
219 B
Bash
Raw Normal View History

2016-05-13 21:42:54 +08:00
#!/bin/bash
#using the until command
var1=100
until [ $var1 -eq 0 ]
do
echo $var1
var1=$[ $var1-25 ]
done
var1=100
until echo $var1
[ $var1 -eq 0 ]
do
echo Inside the loop: $var1
var1=$[ $var1 - 25 ]
done