Random sleep in bash script

Random sleep in bash script


To insert a random sleep into a running script:

 sleep $[ ( $RANDOM % 10 )  + 1 ]s

 
This will introduce a 1-10 second random sleep in the script. 

Comments

Popular posts from this blog

How to clean DB from old logs in Magento 1.x

Reduce (shrink) and resize raw disk at Proxmox

Apache 2.4 + mod_wsgi + Python 3.7 + Django installation on Centos 7.10