Skip to the content

nano.cat

Snippets of Mălin Cenușă

  • Home
  • Categories
  • Malware Samples
  • mălin.ro
  • blackhat.pm
  • palma.solutions

Random sleep duration in bash

Date: July 28, 2020
Tags: bash, Linux, random delay, sleep
Categories: Bash, Linux

This will introduce a 1-10 second random sleep/pause in the script:

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

Reference: https://blog.buberel.org/2010/07/howto-random-sleep-duration-in-bash.html

« Mount datastore in ESXi
Remove all files except specific extension »

Categories



© 2022 nano.cat. All rights reserved. Powered by WordPress.