[prev in list] [next in list] [prev in thread] [next in thread]
List: bash-bug
Subject: Re: Is this right? test -v $hash{defined_value} == false?
From: Linda Walsh <bash () tlinx ! org>
Date: 2015-07-14 6:31:23
Message-ID: 55A4ACBB.3040400 () tlinx ! org
[Download RAW message or body]
Chet Ramey wrote:
> On 7/12/15 11:58 PM, Linda Walsh wrote:
>>> set -A hash
>
> This is an error
---
a brain-o -- at least I got the capitalized-A ;-)
(original code probably had a
> hash hash
or
> map hash
)
declare -A hash...
(I rarely type out the full command due to my aliases
and lazinesses....*ouch*)
>
>>> hash=([defined_value]=22)
>
> This creates an indexed array.
----
Um? Did you really assume I meant 'set'.. well
.... I better not ask... I _have_ been so spacey, which is
why I try to write aliases and trivial helper routines
I should stick to my aliases.. ;-)
Ishtar:/suse132> declare -A has
Ishtar:/suse132> has=([defined_value]=22)
Ishtar:/suse132> declare -p has
declare -A has='([defined_value]="22" )'
> test/[/[[ -v didn't understand array variables and subscripts until bash-4.3.
----
Ahh.... that's what I was wondering... u
Thanks...
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic