Re: List of keys of an associative array

2011-01-03 Thread Greg Wooledge
On Fri, Dec 31, 2010 at 10:56:35AM +0100, dnade@orange-ftgroup.com wrote: > Ha. Indeed, if i use declare ???A, it works. > > But why is bash letting me use foo[bar]=something in the first place, if I > don???t declare foo as an associative array ? > Maybe the bug???s here. As Pierre said, fo

Re: List of keys of an associative array

2010-12-31 Thread Pierre Gaston
On Fri, Dec 31, 2010 at 11:56 AM, wrote: > Ha. Indeed, if i use declare –A, it works. > > > > But why is bash letting me use foo[bar]=something in the first place, if I > don’t declare foo as an associative array ? > > Maybe the bug’s here. > > > > D > > > It's because [ ] is an

RE: List of keys of an associative array

2010-12-31 Thread dnade.ext
Antipolis - France / Tel : 04 97 12 86 20 De : Pierre Gaston [mailto:pierre.gas...@gmail.com] Envoyé : vendredi 31 décembre 2010 10:52 À : NADE Damien Ext DMGP/PORTAIL Cc : bug-bash@gnu.org Objet : Re: List of keys of an associative array On Fri, Dec 31, 2010 at 11:38 AM, mailto:dnade@orange

Re: List of keys of an associative array

2010-12-31 Thread Pierre Gaston
On Fri, Dec 31, 2010 at 11:38 AM, wrote: >Hello > > For regular arrays, we can get the list of keys by using the form > ${!some_arr...@]}. > But this just doesn’t work for associative arrays. > > ${!some_associative_arr...@]} is actually 0. Is that a bug ? > Is there another way to get th