O'Reilly logo

Learning AWK Programming by Shiwang Kalkhanda

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Array sorting

GAWK enables us to control the order in which a for (index in array) loop traverses an array. GAWK provides two built-in functions, asort() and asorti(), to sort arrays based on the array values and indexes, respectively. Using these two functions, we can control the criteria used to order the array elements during sorting.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required