Waiting for Things: watch, until and timeout

watch reruns a command every few seconds and shows its latest result, an until loop waits until a server answers, and timeout stops a command that takes too long, with exit code 124, so a script never waits forever.

Updated

Cheat sheet for the lesson Waiting for Things: watch, until and timeout: watch reruns a command every few seconds and shows its latest result, an until loop waits until a server answers, and timeout stops a command that takes too long, with exit code 124, so a script never waits forever.
Category
Bash
Level
Journeyman
Tags
exit-code, linux, polling, timeout, unix, until-loop, watch