[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: declare a="$b" if $a previously set as array

From: konsolebox
Subject: Re: declare a="$b" if $a previously set as array
Date: Wed, 10 Dec 2014 06:33:00 +0800

On Tue, Dec 9, 2014 at 9:40 PM, Stephane Chazelas
<address@hidden> wrote:
> 2014-12-09 20:55:02 +0800, konsolebox:
> [...]
>> As for the other things, I was actually only concerned about the
>> dangerous behavior that's synonymous to "eval $b" so I didn't really
>> thought about discussing them.  And I'm only referring to Bash when I
>> made the suggestions.  Other shells certainly does not support local
>> scopes.
> [...]
> Not sure what you mean by that last sentence, but all of dash,
> yash, mksh, pdksh, AT&T ksh, posh, zsh (so virtually all modern
> Bourne-like shells) do support local scopes each with variations
> of behaviour and syntax.

I know ksh, pdksh and zsh supports local but I didn't know that dash
does it too - or maybe I forgot.  I always remember that it's a pure
POSIX shell but apparently it's not.  And sorry I actually meant
"some other".  Consider a more conservative shell like heirloom-sh.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]