Bash patterns I use weekly
This thread seems like a good place to ask this:<p>When you're running a script, what is the expected behaviour if you just run it with no arguments? I think it shouldn't make any changes to your system, and it should print out a help message with common options. Is there anything else you expect a script to do?<p>Do you prefer a script that has a set of default assumptions about how it's going to work? If you need to modify that, you pass in parameters.<p>Do you expect that a script will lay out the changes it's about to make, then ask for confirmation? Or should it just get out of your way and do what it was written to do?<p>I'm asking all these fairly basic questions because I'm trying to put together a list of things everyone expects from a script. Not exactly patterns per se, more conventions or standard behaviours.