Showing posts with label String generation. Show all posts
Showing posts with label String generation. Show all posts

Thursday, January 28, 2016

Generating Random 15-Character User Name

Generating random 15-character:
$ cat /dev/urandom | env LC_CTYPE=C tr -dc 'a-z0-9' | fold -w 15 | head -n 1
This is the same:
$ $ cat /dev/urandom | env LC_CTYPE=C tr -cd '[:lower:][:digit:]' | fold -w 15 | head -n 1