3 ms·
sh shell is specified in POSIX, and it's 'always' there, but it's simply not as usable as bash. It's easier to start as a sh script and give into make it a bash
by toast0 4y ago
sh shell is specified in POSIX, and it's 'always' there, but it's simply not as usable as bash. It's easier to start as a sh script and give into make it a bash script than to switch to something else later.
Perl has a reputation, and isn't always available. Python isn't always available either and has the 2 vs 3 problem still (maybe not for much longer).
Many scripts are super simple, or at least start that way, so something that starts as just a list of commands to run is a better interface; but it gets unweildy if you need deeper logic and nesting of things. Such is life.
- cben 4y ago#!/usr/bin/env python3 Mere `python` will remain ambiguous for years whether you'll get 2 or 3, but explicit `python3` doesn't have that problem.