🔥 3-day streak
CompTIA Linux+ (XK0-006)25 / 123
Question 25 of 123

You are writing a deployment script that must pause until a backend service responds successfully to a health check before continuing. The command 'curl -sf http://localhost:8080/health' returns exit status 0 when the service is healthy and non-zero otherwise. You want the script to keep retrying (with a 2-second pause between attempts) and only proceed once the check succeeds. Which loop construct correctly accomplishes this?

Reviewed for accuracy · Report an issueNext question