Usage:
-
Save this script to
gen-password.shfile -
Make it executable:
chmod +x ./gen-password.sh -
[OPTIONAL] Place it somewhere in your
$PATH, e.g.sudo mv ./gen-password.sh /usr/local/bin/ -
Run it. Optional argument is the length of the password:
gen-password.sh 32