From 4d6866f449215eedde50f6974c43c0d7d882bb44 Mon Sep 17 00:00:00 2001 From: Lars Wirzenius Date: Sun, 11 May 2008 09:32:40 +0300 Subject: Wrote a do-until command. --- do-until | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100755 do-until diff --git a/do-until b/do-until new file mode 100755 index 0000000..d9dc863 --- /dev/null +++ b/do-until @@ -0,0 +1,12 @@ +#!/bin/sh +# +# do-until - run a command until it succeeds +# +# Lars Wirzenius + +cmdline="$@" +while ! $cmdline +do + echo "Command failed, trying again in 1 second" + sleep 1 +done -- cgit v1.2.1