-
-
Save toshi0383/32728879049e95db41ab801b1f055009 to your computer and use it in GitHub Desktop.
Generate random alphanumeric on bash on Mac
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# SeeAlso: http://unix.stackexchange.com/questions/45404/why-cant-tr-read-from-dev-urandom-on-osx | |
LC_CTYPE=C tr -dc 'A-Z0-9' < /dev/urandom | head -c 32 | xargs echo |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment