One line infinite while loop


while true; do echo 'Hit CTRL+C to exit'; someCommand; someOtherCommand; sleep 1; done

alternative syntax

while :; do echo 'Hit CTRL+C to exit'; someCommand; someOtherCommand; sleep 1; done

This post is also available in: Greek

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.