@Ralph Yes, you can definitely encode the same thing (more or less laboriously) in the shell, though as you say, it tends to be different in each shell -- and, in some, distinctly unmemorable! [FWIW, I've also found the -v switch in try_repeat more useful than I first expected. It's quite useful to get a sense of how often a non-deterministic failure occurs.]
or zsh's
Given it runs the command up to N times, perhaps zero if the first execve(2) fails, perhaps
upto
reads well.