Created
June 12, 2024 13:55
-
-
Save bdashrad/656d55ffcb515f5d63d70a4529b3565d to your computer and use it in GitHub Desktop.
Revisions
-
bdashrad created this gist
Jun 12, 2024 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,10 @@ #!/usr/bin/env bash # example exponential backoff in bash for (( i=0; ; i++)); do TIME=$(echo "2^$i" | bc) [ $TIME -ge 32 ] && exit 1 sleep $TIME // do stuff && break done