On 8/18/23 11:42, Paul Gilmartin wrote:
On Fri, 18 Aug 2023 15:16:13 +0000, Seymour J Metz wrote:
As long as they included something that looked like the Bourne shell, adding
other shells as options wouldn't have affected POSIX and X.OPEN compliance.
Bourne shell falls considerable short of POSIX and X.OPEN compliance.
I once told an antiquarian of a SunOS 4 /bin.sh deficiency (tilde expansion,
IIRC.) He quickly remarked, "Oh, that's Bourne shell." I believe Bourne
also lacks "$( ... )" command substitution. Perhaps obsessed with
portability, I test some scripts with dash.
DASH is an excellent test shell for shaking out compatibility problems.
Acorse, the best option would be to run scripts against *several* shells
(and DASH, BASH, ZSH, and PDKSH are all easy to come by).
We're not after Bourne as such, just the common superset. (Where we see
that both ZSH and BASH vary.)
We're also (here) not talking about interactive shell, but we've drifted
into scripting.
Preferences in e.g., desktop managers, languages, operating systems, are highly
subjective; if it works for you, that's what matters.
Now, if you're working on a large project hen some standardization is needed;
again, if the choices made on the project work for the project, that's what
matters.
Requirements are stricter for ISVs targeting multiple platforms and FOSS
developers.
Indeed!
But I always press my teammates (sometimes ISV, but not for the current
gig) to make their shells portable. It's not difficult and prevents
"oooppss" when someone else takes their script in a different direction.
https://github.com/trothr/best/blob/main/Shell.md
-- R; <><
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN