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 suggestion would work well to ensure an even spread over the window of time.
$ perl -e 'sleep rand 4'is probably the cleanest / most efficient way to do this with existing tools.
Cheers, Phil