From: Chet Ramey Subject: Re: feature proposal: expand associative arrays in lexicographic order ... Date: Tue, 25 Aug 2026 10:38:06 -0400
Earlier, I wrote: >>FWIW, I could not figure out how to use the bash "asort" extension. This was intended more as a statement of fact than as a request for help. In fact, it was a long time ago, when I was first designing the idiom I posted previously, that I looked at the "asort" extension, and just couldn't get the gist of it. Still can't, as it turns out. >declare -a array=([0]="zero" [1]="one" [2]="two" [3]="three" [4]="four" >[5]="five" [6]="six") >declare -a array=([0]="five" [1]="four" [2]="one" [3]="six" [4]="three" >[5]="two" [6]="zero") >declare -a new=([0]="5" [1]="4" [2]="1" [3]="6" [4]="3" [5]="2" [6]="0") >Does this help? Not really. It still looks like gibberish to me. But, no worries. ================================================================================= Please do not send me replies to my posts on the list. I always read the replies via the web archive, so CC'ing to me is unnecessary. When responding to my posts, please try to refrain from giving bureaucratic answers. If you have nothing useful to say, then just click Next and go on. BTW, ain't interested in kludgey workarounds - got enough of my own! (YT id: 6H1lcubN0oE)
