I have following code
</dev/urandom tr -dc 'A-Za-z0-9@#$%&_+=' | head -c 16
which is randomly generating password perfectly.
I want two changes:
- It should only contain 1 special symbols that i have listed there
- It should choose random length of the password
I tried with length = $(($RANDOM%8+9))
then putting length at
</dev/urandom tr -dc 'A-Za-z0-9@#$%&_+=' | head -c$length
but no positive result.
Aucun commentaire:
Enregistrer un commentaire