Re: The "asort" extension (Was: feature proposal: expand associative arrays in lexicographic order ...)

Zachary Santer <[email protected]>
Newsgroups gmane.comp.shells.bash.bugs
Message-ID <CABkLJU+te+cx8fZXahgWNeVRqOqPF7xTZ-Zj+dFM4zJp12noTA@mail.gmail.com>
On Tue, Aug 25, 2026 at 2:31 PM Stan Marsh <[email protected]> wrote:
>
> Rather, the sorting is a functionality associated with the "for"
> statement. That's how it works in GAWK, and I think that should be the
> model for how it should work in bash.

The indexed array expands in index numerical order anywhere you expand
it. The for loop just takes whatever you give it in the order you give
it in. It doesn't have to be an array expansion at all.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.