[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: is there a way to assign indexed arrays like the new assoc arrays wa
From: |
Alex fxmbsw7 Ratchev |
Subject: |
Re: is there a way to assign indexed arrays like the new assoc arrays way without [..]= typing ? |
Date: |
Fri, 12 Mar 2021 22:45:34 +0100 |
the point was without the [..]= cosmetics, eg arg separated like the new
assoc assign way
On Fri, Mar 12, 2021 at 10:44 PM Lawrence Velázquez <vq@larryv.me> wrote:
> > On Mar 12, 2021, at 4:39 PM, Alex fxmbsw7 Ratchev <fxmbsw7@gmail.com>
> wrote:
> >
> > so i heard off my good buddy greycat
>
> roflmfao
>
> > that i could assign assoc arrays like
> > declare -A assoc=( key1 val1 key2 val2 )
> > that was new and nice
> >
> > is there such also for indexed arrays, or planned to do ? since it makes
> > coding very simpler
> >
> > otherwise, i have to parse and reset declare -p output for, ..whatever
> > purpose
> > mass modifying or so arrays without loop
> >
> > with such a way for indexed arrays too such would be much simpler
>
> bash-5.1$ declare -a arr=([3]=foo [7]=bar)
> bash-5.1$ declare -p arr
> declare -a arr=([3]="foo" [7]="bar")
>
> --
> vq
- is there a way to assign indexed arrays like the new assoc arrays way without [..]= typing ?, Alex fxmbsw7 Ratchev, 2021/03/12
- Re: is there a way to assign indexed arrays like the new assoc arrays way without [..]= typing ?, Lawrence Velázquez, 2021/03/12
- Re: is there a way to assign indexed arrays like the new assoc arrays way without [..]= typing ?,
Alex fxmbsw7 Ratchev <=
- Re: is there a way to assign indexed arrays like the new assoc arrays way without [..]= typing ?, Lawrence Velázquez, 2021/03/12
- Re: is there a way to assign indexed arrays like the new assoc arrays way without [..]= typing ?, Alex fxmbsw7 Ratchev, 2021/03/12
- Re: is there a way to assign indexed arrays like the new assoc arrays way without [..]= typing ?, Eli Schwartz, 2021/03/12
- Re: is there a way to assign indexed arrays like the new assoc arrays way without [..]= typing ?, Alex fxmbsw7 Ratchev, 2021/03/12
- Re: is there a way to assign indexed arrays like the new assoc arrays way without [..]= typing ?, Alex fxmbsw7 Ratchev, 2021/03/12
- Re: is there a way to assign indexed arrays like the new assoc arrays way without [..]= typing ?, Greg Wooledge, 2021/03/13
- Re: is there a way to assign indexed arrays like the new assoc arrays way without [..]= typing ?, Alex fxmbsw7 Ratchev, 2021/03/13