passwd-gen.sh is a /dev/random sanitizer for generating random passwords of various length and complexity.

$ ./passwd-gen.sh 16
WYQwDY0fVpfouu6O
Length of password: 16
Total bytes read:   73
Device:             /dev/random
Set:                [:alnum:]

The script is well commented, so there's not much more to say here...