2 ms·
If you want to write portable scripts and use a reasonable interactive shell, you need to know two shells anyway. Scripts should ideally be written to only use
by adrusi 5y ago
If you want to write portable scripts and use a reasonable interactive shell, you need to know two shells anyway. Scripts should ideally be written to only use shell features defined in POSIX, since bash isn't available on every system. It's available pretty widely, but not on e.g. Alpine Linux by default, and the version on macOS is so ancient it doesn't have features like wait -n.
Unless you're going to use rlwrap /bin/dash as your default interactive shell (please don't) you need to know both your interactive shell and standard shell if you're going to write portable scripts.
- Ensorceled 5y ago> Scripts should ideally be written to only use shell features defined in POSIX, since bash isn't available on every system. I don't write system scripts that need to run on systems without bash and have not needed to do that for a long, long time.