4 ms·
Some of their style guides are a bit... particular to their situation, but this one I absolutely agree with. There are so many pitfalls, so many weird interact
by Quekid5 6y ago
Some of their style guides are a bit... particular to their situation, but this one I absolutely agree with.
There are so many pitfalls, so many weird interactions with pipes and error conditions in subprocesses, signals(!), etc. etc. that it can be hard to write even "bail as soon as ANYTHING goes wrong" logic.
(And that's not even accounting for things like "rm -rf $FOO/" going wrong. The shell fully embraced Stringly Typed Programming and this is the inevitable result.)
I have recently learned of linters and such for bash/sh scripts, but that's a bandaid at best.