Skip to content

Instantly share code, notes, and snippets.

@fazlearefin
Created September 22, 2021 16:34
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fazlearefin/b8060b333cce9df3f2074434d3308857 to your computer and use it in GitHub Desktop.
Save fazlearefin/b8060b333cce9df3f2074434d3308857 to your computer and use it in GitHub Desktop.
Bash | Sleep random seconds
#!/bin/bash
# 1-10 second random sleep/pause in the script
sleep $[ ( $RANDOM % 10 ) + 1 ]s
# even shorter sleep
sleep .$[ ( $RANDOM % 10 ) + 1 ]s
sleep .0$[ ( $RANDOM % 10 ) + 1 ]s
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment