Created
August 22, 2019 05:17
-
-
Save look4regev/fad974a1a65724c571e304cb6bfc2977 to your computer and use it in GitHub Desktop.
Bash function to make a random 12 chars string including numbers, special chars and lower+upper case
This file contains 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 | |
krand() { | |
# Outputs random 12 chars string including numbers, special chars and lower+upper case | |
dd if=/dev/urandom count=1 2>/dev/null | base64 | head -1 | cut -c4-15 | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment