execline
Software
www.skarnet.org

The loopwhile program

loopwhile performs a conditional loop.

Interface

     loopwhile [ -n ] ~prog... ; remainder...
or in a execlineb script:
     loopwhile [ -n ] { prog... } remainder...

Options

Note

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.