Advertisements
The syntax is as follows :
until [ "$Condition_variable1" operation "$Condition_variable2" ]
do
commands to execute
done
The thing to note is "$Condition_variable1" should be greater than "$Condition_variable12" here in this example.
See the example given below :
#!/bin/bash
NUM=10
MIN=5
until [ "$NUM" -eq "$MIN" ]
do
echo $NUM
let "NUM -= 1"
done
No comments:
Post a Comment
Be nice. That's all.