Plan 9 from Bell Labs’s /usr/web/sources/contrib/anothy/bin/rc/waitloop
#!/bin/rc # Retry a command with a minimum delay. Avoid chewing up # the machine on commands with transient failures. if (test $#* -lt 2) { echo 'usage: ' $0 ' seconds command...' >[1=2] exit usage } sec=$1 shift while () { $* & sleep $sec wait }