3 ms·
Sorry, that came off snarkier than I meant rereading it. You’re 100% correct. I’ve grown more tolerant of these ceremonial uses. There really aren’t many folks
by salmo 4y ago
Sorry, that came off snarkier than I meant rereading it.
You’re 100% correct. I’ve grown more tolerant of these ceremonial uses. There really aren’t many folks that understand shell. I see it in CICD, etc all the time, too.
The one left that kills me that I see in vendor scripts all the time is ‘command; ret=$?; if [ “$ret” -ne 0 ]; then foo; fi’
If you’re handling return code cases, then cool. But folks don’t realize ‘test’ aka ‘[‘ is just another command.
But then again, so much Java, etc. I read is the same copy/paste. Those can be worse because example code isn’t prod ready, where bad shell usually does the right thing, just awkwardly or inefficiently.
But as you point out, so much isn’t thinking about what you’re doing, just mimicking.