User Tools

Site Tools


while

If you want to send us your comments, please do so. Thanks
More on comments


while

Example infinite loop:

 i=0; while [[ $i -eq 0 ]]; do echo Hello; sleep 2; done

Example loop stops after 11 iterations:

i=0; while [[ $i -le 10 ]]; do echo Hello; sleep 2; ((i++)); done

This does not stop after one iteration. It is an infinite loop playing ever wav file in the directory

echo $?; while [[ $? -eq 0 ]]; do aplay *.wav; done

Main subjects on this wiki: Linux, Debian, HTML, Microcontrollers, Privacy

RSS
Disclaimer
Privacy statement
Bugs statement
Cookies
Copyright © : 2014 - 2024 Webevaluation.nl and the authors
Changes reserved.

This website uses cookies. By using the website, you agree with storing cookies on your computer. Also you acknowledge that you have read and understand our Privacy Policy. If you do not agree leave the website.More information about cookies
while.txt · Last modified: 20-06-2021 14:51 by wim