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 [
You can use semicolons to separate statements:
$ while [ 1 ]; do foo; sleep 2; done