Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

2
  • thanks! now I have this (I removed some special characters not supported by my app) { shuf -r -n4 -e {A..Z}; shuf -r -n4 -e {a..z}; shuf -r -n4 -e {0..9}; shuf -r -n2 -e {$(sed -e 's/./& /g' <<< '@%+\/!#$^?:.(){}[]-_.')}; } | shuf | tr -d $'\n'; now the issue that I have is that numbers or special characters can not be the first character in the password, I can remove last shuf but this will have first all upper case, then all lowercase, then numbers and last the special characters, I need something like put at least 1 letter and then doesn't matter the order Commented Oct 27, 2021 at 14:27
  • @ChrisSandovalHidalgo, yep, see edit. Note that you don't need the braces around the command substitution: they'd be added as part of the arguments to shuf, it'd get {@, %, ... {, }, ... ., }. Commented Oct 27, 2021 at 16:45