Automation, Orchestration, and Scripting
A deployment script must pause until a build process creates the file /tmp/ready, then continue with the next step. Which loop does this correctly?
Show the answer
Correct answerB. until [ -f /tmp/ready ]; do sleep 5; done
An until loop repeats while its condition is false, so it sleeps until the file exists and then exits. The while version repeats only while the file exists, so it would exit at once if the file is missing.