Back to article
head -c8 /dev/random | uuencode -m - | sed -n '2s/=*$//;2p'
October 25, 1999
This prints psuedo "random" characters, for use as a password, for instance. The head command gets 16 bytes from the random device, uuencode flattens out the data to convert control characters into printable ascii and the sed magic at the end just gives a short string with none of the fluff from uuencode.