Re: An interesting little quirk - difference between "bash" and "dash" (Linux)

Liste des GroupesRevenir à cu shell 
Sujet : Re: An interesting little quirk - difference between "bash" and "dash" (Linux)
De : naddy (at) *nospam* mips.inka.de (Christian Weisgerber)
Groupes : comp.unix.shell
Date : 05. Jan 2025, 21:27:59
Autres entêtes
Message-ID : <slrnvnlqqf.esd.naddy@lorvorc.mips.inka.de>
References : 1
User-Agent : slrn/1.0.3 (FreeBSD)
On 2025-01-05, Kenny McCormack <gazelle@shell.xmission.com> wrote:

foo=bar;myfun() { local foo; echo "In myfun(), foo = $foo"; };myfun
>
I'm not standards obsessed like some people in these newsgroups; I care
more about desirable functionality.  In this case, I would not be surprised
to hear that the dash behavior is more POSIX-ly correct,

Surprisingly, "local" isn't part of the POSIX shell language at all.

Its only mention is under "If the command name matches the name of
a utility listed in the following table, the results are unspecified".

Is there any POSIX-y shell that does not implement "local"?

--
Christian "naddy" Weisgerber                          naddy@mips.inka.de

Date Sujet#  Auteur
5 Jan 25 * An interesting little quirk - difference between "bash" and "dash" (Linux)6Kenny McCormack
5 Jan 25 +- Re: An interesting little quirk - difference between "bash" and "dash" (Linux)1Kaz Kylheku
5 Jan 25 +- Re: An interesting little quirk - difference between "bash" and "dash" (Linux)1Jerry Peters
5 Jan 25 +- Re: An interesting little quirk - difference between "bash" and "dash" (Linux)1Helmut Waitzmann
5 Jan 25 `* Re: An interesting little quirk - difference between "bash" and "dash" (Linux)2Christian Weisgerber
6 Jan 25  `- Re: An interesting little quirk - difference between "bash" and "dash" (Linux)1Janis Papanagnou

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal