gawk asort normal comparison confusion

view full story

http://ubuntuforums.org – I'm new to gawk. I read the asort function sorts by data element values; when no sort function is specified, in the default order (which I took as numerical sort or lexicographic sort respectively). I do not understand why the below is always the output... Output: Code: index: 4 - value: 4 index: 1 - value: 1 index: 2 - value: 2 index: 3 - value: 3 , independent on which single letter I choose for XXX, as long as the letter is distinct from the other array indices a, g, and m. Command line entered: Code: $ gawk 'BEGIN{ >var["a"] = 1 >var["g"] = 2 >va (Hardware)