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! Although, after reading about your password script, using /usr/share/dict/words I think I'll have to start over. Seems like a much better way to go at it. Thanks for the advice! Commented Mar 4, 2018 at 12:59
  • I'd suggest playing with the example code here and figuring out how it works, before you start working on an improved password generator. Easier to learn first. getopts handling is a basic tool that can be used to improve all your scripts once you know how it works, so it's worth putting in a bit of effort up front....many of my sh scripts start with that basic structure: 1. usage() function; 2. variable initialisation; 3. getopts; 4. other arg handling and validation 5. main code. Or swap the order of 1 & 2 - it's often better to put the configurable defaults up top for visibility. Commented Mar 5, 2018 at 5:11