until Loop – linux shell program
until Loop – linux shell program
- Until loops repeat statements until the next Unix command is successful.
For example:
#!/bin/sh
x=1
until [ $x -gt 3 ]; do
echo x = $x
x=`expr $x + 1`
done
For example:
#!/bin/sh
x=1
until [ $x -gt 3 ]; do
echo x = $x
x=`expr $x + 1`
done