bug-bash
[Top][All Lists]
Advanced

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

Re: nameref to array[@] doesn't always expand to multiple words


From: Chet Ramey
Subject: Re: nameref to array[@] doesn't always expand to multiple words
Date: Thu, 21 Jan 2021 10:43:53 -0500
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:78.0) Gecko/20100101 Thunderbird/78.6.1

On 1/19/21 5:38 AM, Oğuz wrote:
See:

     $ a=(1 2 3)
     $ b=a[@]
     $ declare -n c=a[@]
     $
     $ printf '<%s>\n' "${!b}"
     <1>
     <2>
     <3>
     $ printf '<%s>\n' "$c"
     <1 2 3>

Thanks for the report. This is an easy fix.

--
``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU    chet@case.edu    http://tiswww.cwru.edu/~chet/



reply via email to

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