Last active
February 28, 2021 01:45
-
-
Save LaloHao/a6ed0614671d0fda1aa5378e04a2cefd to your computer and use it in GitHub Desktop.
Generate N password(s), each one having X alphanumeric length
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
# Generate 10 passwords, each one having 80 alphanumeric characters | |
X=80 N=10; cat /dev/urandom | tr -dcs '[:alnum:]' - | fold -w "$X" | head -n "$N" | |
# Generate 10 passwords, each one having 80 alphanumeric characters with at least one of the symbols in '!$%@^&*' | |
X=80 N=10; cat /dev/urandom | tr -dcs '[:alnum:]!$%@^&*' - | fold -w "$X" | grep '\(!\|$\|#\|%\|@\|^\|&\|*\)' | head -n "$N" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment