bash: until loop.
-
Take into account the main readme for this section. README first.
Normally done with a shell script but for demonstration purposes the command line is used.
Syntax until: until test-commands; do consequent-commands; done
What does it do? Execute commands as long as a test does not succeed.$ count=10 $ until [[ $count -lt 5 ]]; do echo $count; ((count--)); done 10 9 8 7 6 5
© Lightnetics 2024