Home Syntax for a single-line Bash infinite while loop
Reply: 0

Syntax for a single-line Bash infinite while loop

user232
1#
user232 Published in June 23, 2018, 4:22 am

I am having trouble coming up with the right combination of semicolons and/or braces. I'd like to do this, but as a one-liner from the command line:

while [ 1 ]
do
    foo
    sleep 2
done
You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.325893 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO