3 ms·
Why use .sh files over this?
by petesergeant 2y ago
Why use .sh files over this?
- al_borland 2y agoFewer tools to manage. It seems like this could also be replaced by some aliases in a .bashrc file. I don't like adding extra dependencies and complicating things if they aren't adding significant benefit. What am I missing here? It seems like an alias with extra steps.
- xigoi 2y agoBecause they don’t require installing a new tool and learning new syntax.
- homebrewer 2y agoWhen this tool becomes as available out of the box as POSIX sh (i.e. practically everywhere, including embedded systems and containers), then this reversed argument will make some sense. I'm willing to bet anything that POSIX sh will still be with us 50+ years from now, and 'just' will be long forgotten by then. You really should have a stronger argument for introducing another dependency into your build process (and onto your developers) than "it has a slightly simpler syntax compared to the industry standard".
- bigstrat2003 2y agoIt's not "slightly simpler", it's massively simpler. Shell scripts are pretty much the worst syntax in existence (barring esolangs that go out of their way to be weird).
- Hackbraten 2y agoWhile shell syntax may be quirky, it absolutely allows you to write scripts that are simple, easy to understand, and maintainable.
- BeetleB 2y agoIt's great that POSIX sh is available everywhere except where it isn't (Windows). In all SW teams I've been in except one, sh was available, and people preferred writing things in something else (usually Python/Perl). I have had an order of magnitude more success convincing teammates to use just than convincing them to use sh. It may be ubiquitous, but it's useless if you can't convince non-shell gurus to use it.