3 ms·
Another fun fact: on Linux systems, the /proc/sys/kernel/random/uuid file contains a random UUID. This can be used to get 32-bit random numbers in POSIX shell w
by patrakov 4y ago
Another fun fact: on Linux systems, the /proc/sys/kernel/random/uuid file contains a random UUID. This can be used to get 32-bit random numbers in POSIX shell without calling out to external utilities. Quite handy on OpenWrt.
read -r < /proc/sys/kernel/random/uuid
MYRAND=$(( 0x${REPLY%%-*} ))