#Bash (+coreutils), 44 bytes
Bash (+coreutils), 44 bytes
/dev/urandom based solution
od -w4 -vtu4</d*/ur*|awk '($0=$2)<='$1|sed q
Will read unsigned 32 bit integers from /dev/urandom
, and filter them out with awk
until it finds one within a given range, then sed q
will abort the pipe.