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

AnonymousLurker
  • 373
  • 2
  • 12
  • 2
    [How to run ssh command until succeeded](https://unix.stackexchange.com/questions/404792/how-to-run-ssh-command-until-succeeded) – Mark Plotnick Dec 18 '18 at 04:45

1 Answers1

3

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

while !cmd; do sleep 1; done
wef
  • 452
  • 2
  • 6