until ... do ... done ( en )

Last modification : 2013/01/26 19:16

After the while loop there is the until loop. The syntax is:
until [ expr ]
do
      command
done
The command is executed since the expr is false.
msh> i=0
msh> until [ $i -gt 10 ] ; do print $i ; (( i++ )) ; done
0
1
2
3
4
5
6
7
8
9
10