manpagez: man pages & more
info gawk
Home | html | info | man

File: gawk.info,  Node: Array Sorting,  Next: Two-way I/O,  Prev: Boolean Typed Values,  Up: Advanced Features

12.3 Controlling Array Traversal and Array Sorting
==================================================

'gawk' lets you control the order in which a 'for (INDX in ARRAY)' loop
traverses an array.

   In addition, two built-in functions, 'asort()' and 'asorti()', let
you sort arrays based on the array values and indices, respectively.
These two functions also provide control over the sorting criteria used
to order the elements during sorting.

* Menu:

* Controlling Array Traversal:: How to use PROCINFO["sorted_in"].
* Array Sorting Functions::     How to use 'asort()' and 'asorti()'.

© manpagez.com 2000-2025
Individual documents may contain additional copyright information.