To run these programs online I request you to go to following link: https://goo.gl/xKheU3
syntax
until expression
do
command1
command2
command3
.
.
.
commandN
done
The above syntax indicates
until do and done are keywords
expression is any conditional expression (termed here to be false)
filename: main.sh
Let us review one example for until loop.
until [[ $var -le 6 ]]
do
echo "Variable: $var"
(( var++ ))
done
Thank you for watching this article.
Regards
Niraj Bhagchandani.
- The until loop is similar to while loop in shell scripting. But the major difference in two of them is
- Until loop executes the statement executes its code-block while its conditional expression is false,
- While loop statement executes its code block while its conditional expression is true.
syntax
until expression
do
command1
command2
command3
.
.
.
commandN
done
The above syntax indicates
until do and done are keywords
expression is any conditional expression (termed here to be false)
filename: main.sh
Let us review one example for until loop.
until [[ $var -le 6 ]]
do
echo "Variable: $var"
(( var++ ))
done
Thank you for watching this article.
Regards
Niraj Bhagchandani.