[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Q on Bash's self-documented POSIX compliance...
From: |
Linda Walsh |
Subject: |
Q on Bash's self-documented POSIX compliance... |
Date: |
Sat, 26 Jan 2013 12:27:51 -0800 |
User-agent: |
Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.8.1.24) Gecko/20100228 Lightning/0.9 Thunderbird/2.0.0.24 Mnenhy/0.7.6.666 |
I noted on the bash man page that it says it will start in posix
compliance mode when started as 'sh' (/bin/sh).
What does that mean about bash extensions like arrays and
use of [[]]?
Those are currently not-POSIX (but due to both Bash and Ksh having
them, some think that such features are part of POSIX now)...
If you operate in POSIX compliance mode, what guarantee is there that
you can take a script developed with bash, in POSIX compliance mode,
and run it under another POSIX compliant shell?
Is it such that Bash can run POSIX compliant scripts, BUT, cannot be
(easily) used to develop such, as there is no way to tell it to
only use POSIX?
If someone runs in POSIX mode, should bash keep arbitrary bash-specific
extensions enabled?
I am wondering about the rational, but also note that some people believe
they are running a POSIX compatible shell when they use /bin/sh, but would
get rudely surprised is another less feature-full shell were dropped in
as a replacement.