for i in {0..60}; do true -- "$i" # shelleck surpression if eventually_succeeds; then break; fi sleep 1s done
for _ in
In Bash, or literally whenever you are dealing with POSIX/IO/Processes, you need to work with defensive coding practices.
Whatever you do has consequences
Could easily prefix eventually_succeeds with timeout.