Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > gnu.bash.bug > #15932

Re: ${!variable@operator} does not work for variables without values; inconsistencies between present and absent [@] for @A and @a

From Chet Ramey <chet.ramey@case.edu>
Newsgroups gnu.bash.bug
Subject Re: ${!variable@operator} does not work for variables without values; inconsistencies between present and absent [@] for @A and @a
Date 2020-02-20 14:13 -0500
Message-ID <mailman.1281.1582226013.2412.bug-bash@gnu.org> (permalink)
References <CALaCa4xQYy3pT31++yU-QcXvQg-EJctg8etQX5e+c4fcw=pEhA@mail.gmail.com> <d07a0ad0-bc3e-c484-97f0-6e82aef5fedd@case.edu>

Show all headers | View raw


On 2/19/20 4:03 PM, Arfrever Frehtes Taifersar Arahesis wrote:

> ${variable@A} does not work for scalar variables without values, but
> interestingly ${variable[@]@A} works for them.

What does this mean? If you have, for instance,

declare -lr VAR1
echo ${VAR1@A}
echo ${VAR1[@]@A}

you get two empty lines.


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

Back to gnu.bash.bug | Previous | Next | Find similar


Thread

Re: ${!variable@operator} does not work for variables without values;  inconsistencies between present and absent [@] for @A and @a Chet Ramey <chet.ramey@case.edu> - 2020-02-20 14:13 -0500

csiph-web