:: how to create random password using bash
|
0 |
$ < /dev/urandom tr -dc A-Za-z0-9_ | head -c8 |
:: make simple random password script
|
0 1 2 3 4 5 6 7 8 |
$ vi ranpass.sh #!/bin/bash p=$( < /dev/urandom tr -dc A-Za-z0-9_ | head -c8 ) echo "${p}" $ chmod +x ranpass.sh $ ./ranpass.sh 3GXuPBx6 |
:: link
+ google

I don’t understand.
-d option in tr shouldn’t delete and exclude instead of select alphanumeric characters?
@Leonardo::
you can read manual for tr, using command:
$ man tr
-d, –delete
delete characters in SET1, do not translate