4zux3a
Last Updated: March 07, 2016
·
10.23K
· clowder

Random string generator, Bash

cat /dev/random | tr -dc "[:alpha:]" | head -c 8

If you hit an Illegal byte sequence error try...

cat /dev/random | LC_CTYPE=C tr -dc "[:alpha:]" | head -c 8

2 Responses
Add your response

2429

Found I needed LC_ALL on bash v4.2 in OSX Terminal

over 1 year ago ·
27331

Thank you very much - just what I was looking for. Was headed this direction, but this made the trip much nicer!

over 1 year ago ·