Skip to content

Instantly share code, notes, and snippets.

@MartinMSPedersen
Last active January 2, 2022 12:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save MartinMSPedersen/e71704e28cd08e3688ddde9b05e6f54a to your computer and use it in GitHub Desktop.
Save MartinMSPedersen/e71704e28cd08e3688ddde9b05e6f54a to your computer and use it in GitHub Desktop.
Generate passwords
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
}
@MartinMSPedersen
Copy link
Author

Generate random password(s)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment