An interesting sort problem

Michael Hennebry hennebry at web.cs.ndsu.nodak.edu
Fri Nov 13 02:38:35 UTC 2015


Awk can do what you want:
{
     lines[NR]=$NF " " $0
}

END {
     PROCINFO["sorted_in"]="@val_type_asc"
     for line in lines {
         j=index(line, " ")
         print substr(line, j+1)
}

-- 
Michael   hennebry at web.cs.ndsu.NoDak.edu
"Sorry but your password must contain an uppercase letter, a number,
a haiku, a gang sign, a heiroglyph, and the blood of a virgin."
                                                              --  someeecards


More information about the users mailing list