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

 

until loop in linux sheel script
until loop in linux sheel script
For any query or issue, feel free to discuss on http://discuss.eduguru.in