The problem with bash scripts is that they are never simple, they are convoluted, use vague idioms to save key strokes, and it takes quite some time for sysadmins to learn them well; I think every one has stories like how she learned to double-quote all variables in if-statement (test not internal) after her hard drive was formatted because of the space in the variable and that bash silently ignored the line.
On the other hand, a simple declarative text file is certainly more elegant. New sysadmins are just lucky, older sysadmins with a good taste will be happier too, after they spend a few hours to learn some new tricks.
Posted Jan 27, 2013 5:01 UTC (Sun) by Aliasundercover (subscriber, #69009)
[Link]
This is my complaint with scripts as well. Even if well written for clarity they present a hard challenge because they can do anything. I find a plain declarative configuration file easier even if it is one I don't know yet because its scope is bounded.
evolution
Posted Jan 29, 2013 7:26 UTC (Tue) by Seegras (subscriber, #20463)
[Link]
"Some old-school Unix habits have persisted long past
the point that they're even remotely sane. Shell programming at any
volume above a few lines of throwaway code is one of them - it's
*nuts* and we should *stop doing it*." -- ESR on shell scripts. http://lwn.net/Articles/527308/
ESR does not speak for me
Posted Jan 31, 2013 13:12 UTC (Thu) by ncm (subscriber, #165)
[Link]
This recommendation is almost enough to make me take up shell programming again. Or sed.
ESR does not speak for me
Posted Jan 31, 2013 15:29 UTC (Thu) by HelloWorld (guest, #56129)
[Link]
I agree about ESR, but even a broken clock is right twice a day ;-)