On Fri, 2025-04-18 at 00:17 -0700, Mike Wright wrote:
> On 4/17/25 23:23, Samuel Sieb wrote:
> > declare -n arr=array${1}
> > echo ${arr[$2]}
> 
> My hat is off to you, good sir.
> 
> I'd bumped into declare earlier today but couldn't grasp it in the 
> context where it was used.
> 
> With your help I now have my password generator working.
> 
> pwgen [length] [radix]
> 
> I use radix=70 when I'm dealing with the uninformed sites that still 
> insist on numbers, upper and lower alpha, and a "special" character.
> 
> I guess they never got the memo that a larger character set helps a 
> little but a slightly longer password is exponentially stronger.

Not specific to your question, but I highly recommend shellcheck as a
way to catch errors and ambiguities in Bash scripts. I've found it to
be very helpful.

dnf info shellcheck

poc
-- 
_______________________________________________
users mailing list -- users@lists.fedoraproject.org
To unsubscribe send an email to users-le...@lists.fedoraproject.org
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/users@lists.fedoraproject.org
Do not reply to spam, report it: 
https://pagure.io/fedora-infrastructure/new_issue

Reply via email to