bug-bash
[Top][All Lists]
Advanced

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

Re: ${!variable@operator} does not work for variables without values; i


From: Chet Ramey
Subject: Re: ${!variable@operator} does not work for variables without values; inconsistencies between present and absent [@] for @A and @a
Date: Thu, 20 Feb 2020 15:36:37 -0500
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:68.0) Gecko/20100101 Thunderbird/68.5.0

On 2/19/20 4:03 PM, Arfrever Frehtes Taifersar Arahesis wrote:
> ${!variable@operator} does not work for variables without values.
> See empty values for all occurrences of ${!var@...} below.
> 
> ${variable@A} does not work for scalar variables without values, but
> interestingly ${variable[@]@A} works for them.
> See difference between ${VAR1@A} and ${VAR1[@]@A} below.
> However neither ${variable@A} nor ${variable[@]@A} works for arrays
> without values.
> 
> Both ${variable@a} and ${variable[@]@a} work for scalar variables
> without values.
> However ${variable[@]@a} does not work for arrays without values.

Same answer as previously: maybe it should display the attributes
even thought the variable is unset.

-- 
``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]