4 ms·
Assume the environment you're writing scripts for. Most scripts need only be run on one machine, and thus one platform. Most that don't still run only on one pl
by qwertyuiop924 10y ago
Assume the environment you're writing scripts for. Most scripts need only be run on one machine, and thus one platform. Most that don't still run only on one platform. If you need a portable shell script, by all means write one, but that's rarely the case.
- Annatar 10y agoAssume you know how to write shell programs which work everywhere without modification; why would you make your program unportable on purpose?
- qwertyuiop924 10y agoIn some cases, it can significantly shorten and clarify the code. That's a Good Thing. Nobody wants to debug shell scripts.
- Annatar 10y agoThe clean / portable way is in my experience always simpler, or rather, more rudimentary than using unnecessary GNU/Linux-only commands and constructs, simply because the clean / portable methodology uses the lowest common denominator. If you know of, or have such a case, I would be really interested to see it, out of purely professional interest. Nobody wants to debug shell scripts. I want to debug shell scripts, because of all the debugging I've done over the years, shell script debugging is by far the quickest / easiest: DEBUG="${DEBUG:-false}" $DEBUG && set -x and one can see the machine state immediately. Best debugging experience by far.