48 ms·
On OpenBSD, it's even simpler to just echo $RANDOM, but that only gets you 15 bits because sh. sysctl -n kern.arandom can be used in a pinch, too.
by tedunangst 12y ago
On OpenBSD, it's even simpler to just echo $RANDOM, but that only gets you 15 bits because sh. sysctl -n kern.arandom can be used in a pinch, too.
- eridius 12y agoTheoretically couldn't you do something like echo $(( $RANDOM << 15 | $RANDOM )) to get 30 bits?