How to Repeat Commands Until a Condition Is True in bash and zsh with until
· 4 min read
Some jobs repeat until something changes: retry until a server answers, wait until a file appears, count up to a limit. The shell's until loop runs a block of commands again and again until a test succeeds. This guide counts three attempts, with real output from zsh 5.9 and bash 3.2.
