Sujet : Re: Which shell and how to get started handling arguments
De : gazelle (at) *nospam* shell.xmission.com (Kenny McCormack)
Groupes : comp.unix.shellDate : 16. Apr 2024, 20:59:03
Autres entêtes
Organisation : The official candy of the new Millennium
Message-ID : <uvmla7$3s52p$1@news.xmission.com>
References : 1 2 3 4
User-Agent : trn 4.0-test77 (Sep 1, 2010)
In article <
87y19dqgsh.fsf@nosuchdomain.example.com>,
Keith Thompson <Keith.S.Thompson+
u@gmail.com> wrote:
Christian Weisgerber <naddy@mips.inka.de> writes:
On 2024-04-15, Keith Thompson <Keith.S.Thompson+u@gmail.com> wrote:
Bash has an option that tells it to (attempt to) restrict itself to
POSIX semantics:
>
No, it does not:
>
Starting Bash with the '--posix' command-line option or executing
'set -o posix' while Bash is running will cause Bash to conform more
closely to the POSIX standard by changing the behavior to match that
specified by POSIX in areas where the Bash default differs.
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>
This only tweaks bash's behavior where it otherwise differs from
POSIX. It does not disable the myriad extensions.
>
I stand corrected.
ISTR (which is to say, I can't prove it or point to an example at the
moment), that there were some systems under some circumstances where if
bash was copied/linked as "sh" (and then run as "sh" instead of "bash"),
then it did indeed behave like a plain "POSIX" shell (i.e., extensions were
disabled).
It is to be noted that bash is an evolving (i.e., changing) program and
there is no written "standard" for it - like Perl, it is just whatever its
current maintainers makes it out to be at any particular moment. This
makes it hard to make the kind of hard-and-fast statements about it that
people in newsgroups like this one like so much to do.
-- Elect a clown, expect a circus.