Categories: links, linux, programming, python, snark, solaris, spam, sysadmin, tech, unix, web.
|
2009-11-06 A shell script thing that I have learned the hard wayHere is a note to myself about shell scripting, especially things that I
write on the fly on the command line: under no circumstance should I use
any ' I say this because, based on experimental evidence so far, I am
completely sure to use (This is where someone recommends ' The Bourne shell isn't the only language where it's not an error to use an undefined variable, of course. While it's tempting to say that this behavior is a bad idea, that's really treating the symptom and not the disease; my real mistake is using the wrong index variable, not using an undefined variable. Catching the symptom would only save me until the day when I write:
The (I suspect that the usual general proposal to deal with this is to make loop index variables go out of scope at the end of loops.) Sidebar: where this came fromToday's version of this lesson was writing:
The goal was to clean up some ZFS pool state, but instead it did nothing at all (the
'
|
These are my WanderingThoughts GettingAround This is part of CSpace, and is written by ChrisSiebenmann. * * * Atom feeds are available; see the bottom of most pages. Categories: links, linux, programming, python, snark, solaris, spam, sysadmin, tech, unix, web |