How to retry a bash command until its status is ok or until a timeout is reached?
My best shot (I\'m looking for something simpler):
NEXT_WAIT_TIME=0
You can simplify things a bit by putting command right in the test and doing increments a bit differently. Otherwise the script looks fine:
command
NEXT_WAIT_TIME=0 until [ $NEXT_WAIT_TIME -eq 5 ] || command; do sleep $(( NEXT_WAIT_TIME++ )) done [ $NEXT_WAIT_TIME -lt 5 ]