1

Is there a tool that can accept a command and run it over and over until exit status is 0?

I could probably check for value of $? in a loop but I wonder if there's a standard program for this

2

No, I think the loop is so trivial it hasn't been encoded into a command. Something like

while !cmd; do sleep 1; done
  • 2
    Or until cmd; do :; done to use until and without the delay. – Kusalananda Dec 18 '18 at 7:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.