while loops over its body over and over, and executes the condition command before each iteration. If the condition command succeeds,
while runs its body again. Otherwise, it ends. The
break command ends the loop immediately, no matter what. The
continue command skips the rest of the body and goes right to the next iteration.
test (and its alias "[") aren't math-like expressions. They are actaully commands. See
man test for more.
Backticks execute the command inside, and are substituted for what the command prints to stdout.
(Note that you really should use $(command) instead of backticks. They can't be confused with commas, they nest easily, and backslashes aren't interpreted differently inside).
Hopefully now it should be clear that this:
Code:
while [ `sleep 30m` ]
do
# body
done
is actaully an infinite loop that runs its body every 30 minutes.