1 2 3 4 5 6 7 8 9
{ a[$0]++ } END { PROCINFO["sorted_in"] = "@ind_str_asc" for (i in a) print i PROCINFO["sorted_in"] = "@ind_str_desc" for (i in a) print i }