|
apg password without non-alphanumeric characters
I'm trying to get a password in a bash script for mysql user creation. But sometimes a get a non-alphanumeric character(s) in the password, and mysql failes with that.
I tryed with apg -EO0Il1`~!@#$%^&*()_+-=[]\;./{}|:"'<>? but failed.
I tryed with sed 's/[^a-zA-Z2-9]//g' , but at that moment the minimum password lenght failed.
I'm also fine when there is a better alternative then apg.
Thank you for helping.
|