Last active
September 28, 2024 03:21
-
-
Save MartinMSPedersen/e71704e28cd08e3688ddde9b05e6f54a to your computer and use it in GitHub Desktop.
Generate passwords
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
function generate_passwd { | |
HOW_MANY=${1:-1} | |
LENGTH=${2:-24} | |
for((i=0;i<$HOW_MANY;i++)) | |
do | |
cat /dev/urandom| base64 | tr -d '1lLoO0+/g7\n' | head -c${LENGTH}; echo | |
done | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Generate random password(s)