2 ms·
> The go-to source for randomness in Linux is /dev/urandom, is it not? AFAIK it's the go-to source of randomness in any modern-ish unix. > I’m not sure the be
by masklinn 4y ago
> The go-to source for randomness in Linux is /dev/urandom, is it not?
AFAIK it's the go-to source of randomness in any modern-ish unix.
> I’m not sure the best way to make use of it as a source of random decimals — there are surely a dozen ways to do so — but this works:
`od(1)` will do binary data to decimal:
> head -c4 /dev/urandom | od -An -vtu4
4119929390
> head -c4 /dev/urandom | od -An -vtu4
3540752584
> head -c4 /dev/urandom | od -An -vtu4
998126897