Posts Tagged ‘do’

Do until script succeeds in bash

Posted: 12th September 2013 by Tim in Bash, Linux
Tags: , , , , , ,

Occasionally you want to continue retrying a script or program until it succeeds. In bash, this can be done using the until … do … done syntax, like so: until (<command>); do echo “FAIL!”; sleep 10; done For example, if you wanted to halt processing until a program.log file was created, you could do something […]