Skip to content

Instantly share code, notes, and snippets.

Created August 2, 2014 06:44
Show Gist options
  • Save anonymous/d8e99826e3a947d02c8c to your computer and use it in GitHub Desktop.
Save anonymous/d8e99826e3a947d02c8c to your computer and use it in GitHub Desktop.
$ cat input | awk '{for(i=2;i<=NF;i++){a[i]=$i}printf $1;PROCINFO["sorted_in"]="@val_num_desc";for(i in a){printf " %s", a[i]}print ""}'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment