This would help with some work I'm doing today, but is it of general
interest?
$ sleep --random 4.0
sleeps for a random amount of time up to and including the requested
value. The purpose is that on distributed systems it's disruptive to
have synchronized scripts all starting up together.
Philip Rowlands wrote:
This would help with some work I'm doing today, but is it of general
interest?
$ sleep --random 4.0
sleeps for a random amount of time up to and including the requested
value. The purpose is that on distributed systems it's disruptive to
have synchronized scripts
Philip Rowlands wrote:
This would help with some work I'm doing today, but is it of general
interest?
$ sleep --random 4.0
sleeps for a random amount of time up to and including the requested
value. The purpose is that on distributed systems it's disruptive to
have synchronized scripts all
Pádraig Brady wrote:
sleep $(seq .1 .1 4 | head -n $(($RANDOM%40 +1)) | tail -n1)
Or more concisely using just coreutils logic:
sleep $(seq .1 .1 4 | shuf | head -n1)
cheers,
Pádraig.
On Fri, 18 Sep 2009, Pádraig Brady wrote:
Pádraig Brady wrote:
sleep $(seq .1 .1 4 | head -n $(($RANDOM%40 +1)) | tail -n1)
Or more concisely using just coreutils logic:
sleep $(seq .1 .1 4 | shuf | head -n1)
This still has the quantization effects which I'm trying to avoid. Jim's
perl
Philip Rowlands wrote:
On Fri, 18 Sep 2009, Pádraig Brady wrote:
Pádraig Brady wrote:
sleep $(seq .1 .1 4 | head -n $(($RANDOM%40 +1)) | tail -n1)
Or more concisely using just coreutils logic:
sleep $(seq .1 .1 4 | shuf | head -n1)
This still has the quantization effects which I'm
Pádraig Brady wrote:
Pádraig Brady wrote:
sleep $(seq .1 .1 4 | head -n $(($RANDOM%40 +1)) | tail -n1)
Or more concisely using just coreutils logic:
sleep $(seq .1 .1 4 | shuf | head -n1)
Or save a pipe+process:
sleep $(seq .1 .1 4 | shuf --head=1)