Created
August 21, 2018 23:31
-
-
Save jmillerdesign/75282c7a6f814c7d5f9b80efb3dacc3f to your computer and use it in GitHub Desktop.
Random password generator
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
#!/usr/bin/env bash | |
# Example: lKJjF7cP9V-6GcNOJQJX9 | |
function pw() { | |
string=$(LC_ALL=C tr -dc "a-zA-Z0-9" < /dev/urandom | head -c 20) | |
echo ${string:0:10}-${string:10:10} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment