Sujet : Re: An interesting little quirk - difference between "bash" and "dash" (Linux)
De : janis_papanagnou+ng (at) *nospam* hotmail.com (Janis Papanagnou)
Groupes : comp.unix.shellDate : 06. Jan 2025, 01:23:11
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <vlf7ph$19b4m$1@dont-email.me>
References : 1 2
User-Agent : Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0
On 05.01.2025 21:27, Christian Weisgerber wrote:
Surprisingly, "local" isn't part of the POSIX shell language at all.
[...]
Is there any POSIX-y shell that does not implement "local"?
In Kornshell variable-attributes/properties are regularly specified
using 'typeset' and thus the 'typeset' keyword is also used to create
function-"local" variables.
There's no 'local' keyword in Kornshell, and there's also no alias of
that name defined for 'typeset'[*].
Janis
[*] As opposed to the predefined aliases
nameref='typeset -n'
integer='typeset -i'
float='typeset -E'
etc.