execline
Software
www.skarnet.org
loopwhile performs a conditional loop.
loopwhile [ -n ] ~prog... ; remainder...
or in a execlineb script:
loopwhile [ -n ] { prog... } remainder...
Be careful: execline maintains no state, in particular it uses no real variables, and environment will be of no use here since every instance of prog... runs as a separate child process. To avoid being stuck in an infinite loop, prog... should modify some external state - for instance, the filesystem.