3 ms·
The sheer insanity that are shell scripts is something I don't see talked about often enough. Bash is absolutely wonderful as CLI driver. It's truly an awful
by urthor 5y ago
The sheer insanity that are shell scripts is something I don't see talked about often enough.
Bash is absolutely wonderful as CLI driver. It's truly an awful scripting language).
And yet, I see many, many projects with huge, enormous shell scripts. It beggars belief.
- edejong 5y ago"I can use the shell" != "I can write shell scripts" Bash is really difficult to write well (if at all) and too many people don't appreciate this. Of course this leads to instability in shell scripts. Offender number 1? Dockerfiles!
- nikau 5y agoThat's not a shell problem, that's due to docker not having start and end layer flags, so you end up with stupid long cmd && cmd && cmd sequences to ensure it's all in one layer
- urthor 5y agoBash truly shouldn't be used for a bunch of scripting tasks. Quite simply I don't think you should ever start using shell scripts in your code base in any capacity Eventually you're going to reach something you just don't want to do in Bash, and suddenly now you've got two scripting languages in your codebase? Don't think you want that trouble. Start with a scripting language with decent control structures on day 1 and never have to worry about refactoring.