Skip to main content
deleted 3 characters in body
Source Link
Andrea993
  • 205
  • 3
  • 11

On bash

echobc -l <<< "scale=4 ; $((RANDOM % 10000 ))/10000" | bc -l

where 1/10000 is your random precision and 4 digits your output precision

On bash

echo "scale=4 ; $((RANDOM % 10000 ))/10000" | bc -l

where 1/10000 is your random precision and 4 your output precision

On bash

bc -l <<< "scale=4 ; $((RANDOM % 10000 ))/10000"

where 1/10000 is your random precision and 4 digits your output precision

added 3 characters in body
Source Link
Andrea993
  • 205
  • 3
  • 11

On bash

echo "scale=4 ; $((RANDOM % 100010000 ))/1000"10000" | bc -l

where 1/100010000 is your random precision and 4 your output precision

On bash

echo "scale=4 ; $((RANDOM % 1000 ))/1000" | bc -l

where 1/1000 is your random precision and 4 your output precision

On bash

echo "scale=4 ; $((RANDOM % 10000 ))/10000" | bc -l

where 1/10000 is your random precision and 4 your output precision

Source Link
Andrea993
  • 205
  • 3
  • 11

On bash

echo "scale=4 ; $((RANDOM % 1000 ))/1000" | bc -l

where 1/1000 is your random precision and 4 your output precision