2021年8月23日(月) 10:54 L A Walsh <b...@tlinx.org>: > On 2021/08/19 02:15, Ilkka Virta wrote: > > $ declare -A A=([foo bar]="123 456" [adsf]="456 789") > > $ printf "<%s>\n" "${A[@]@K}" > > <adsf "456 789" "foo bar" "123 456" > > > > > Interesting. I wonder, what's the intended use-case for this? > > > --- > Does it matter?: Organizing data.
I'd guess Ilkka has asked the use case for this particular output format, i.e., the quoted fields inside a single word. If the purpose is organizing the data, I would naturally expect the result in the following more useful format in separate words without quoting: <adsf> <456 789> <foo bar> <123 456> > Anyway, in my experience, asking 'why' or for 'use-cases' seems more often > a way to rule out or determine relative importance, but is almost always > an inaccurate way to do so. I think it is still valid to ask the known/existing use cases when someone doesn't know the existing use cases, which doesn't rule out the other use cases. In particular, I think Ilkka has asked about the intended use case, i.e., the original motivation of adding this feature in Bash 5.1. It doesn't rule out other usages.