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. 


Popular posts from this blog

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

Securing the Pi-hole with fail2ban to prevent DNS Amplification attacks

How can I chroot sftp-only SSH users into their homes?