G
G
Grizzy2016-02-13 02:51:06
bash
Grizzy, 2016-02-13 02:51:06

How to generate a random number in a range?

You need to randomly run the command. In the range from 5 to 30 min.
Those. start after 27 minutes, then after 5, then after 8, then after 3 minutes, then after 17 minutes. etc.

#!/bin/bash
while true; do
    sleep _СЛУЧАЙНОЕ ЧИСЛО_
   _КОМАНДА_
done

Google doesn't help...

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
riot26, 2016-02-13
@riot26

Google doesn't help...

yah?
stackoverflow.com/questions/8988824/generating-ran...
https://www.opennet.ru/docs/RUS/bash_scripting_gui...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question