[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: Chet Ramey
Subject: Re: declare a="$b" if $a previously set as array
Date: Sun, 14 Dec 2014 16:31:39 -0500
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:31.0) Gecko/20100101 Thunderbird/31.2.0

On 12/14/14 4:19 PM, Stephane Chazelas wrote:

> Yes I don't know what Mint (Ubuntu?) did, but it's a bit broken
> see also:
> $ bash -c 'f() { declare a[1]=foo; declare -p a; }; a[0]=x; f; declare -p a' 
> bash: line 0: declare: a: not found
> declare -a a='([0]="x")'
> (sorry about the confusion there).

It might have been changed by a subsequent patch, but I can't see any
obvious candidates.

``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, ITS, CWRU    address@hidden    http://cnswww.cns.cwru.edu/~chet/

reply via email to

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