Skip to content

Instantly share code, notes, and snippets.

@dwisiswant0
Created August 15, 2022 04:35
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 dwisiswant0/ff188781cfbfef357e8751e565cae8d6 to your computer and use it in GitHub Desktop.
Save dwisiswant0/ff188781cfbfef357e8751e565cae8d6 to your computer and use it in GitHub Desktop.
passgen() {
local L
[[ -z "${1}" ]] && L="12" || L="$1"
</dev/urandom strings | \
grep -o "\S*" | \
tr -d $"\n" | \
head -c "${L}"
echo
}
# passgen $@
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment