Skip to main content
added 42 characters in body
Source Link
John
  • 3
  • 3

I need randomized pauses in my script between two numbers smaller than 1 second in my script. The following used to work:

#! /bin/bash
sleep $(python -c "import random;print random.uniform(.2,.8)")

But suddenly it doesn't anymore. Is there any other way to do it?

I'm on Linux Mint 20, if that matters.

I need randomized pauses in my script between two numbers smaller than 1 second in my script. The following used to work:

#! /bin/bash
sleep $(python -c "import random;print random.uniform(.2,.8)")

But suddenly it doesn't anymore. Is there any other way to do it?

I need randomized pauses in my script between two numbers smaller than 1 second in my script. The following used to work:

#! /bin/bash
sleep $(python -c "import random;print random.uniform(.2,.8)")

But suddenly it doesn't anymore. Is there any other way to do it?

I'm on Linux Mint 20, if that matters.

Source Link
John
  • 3
  • 3

Random float sleep in bash script?

I need randomized pauses in my script between two numbers smaller than 1 second in my script. The following used to work:

#! /bin/bash
sleep $(python -c "import random;print random.uniform(.2,.8)")

But suddenly it doesn't anymore. Is there any other way to do it?