Skip to content

Instantly share code, notes, and snippets.

Created August 2, 2014 06:42
Show Gist options
  • Save anonymous/4f3d7fb9a67ce7c3a6e5 to your computer and use it in GitHub Desktop.
Save anonymous/4f3d7fb9a67ce7c3a6e5 to your computer and use it in GitHub Desktop.
$ cat input | awk '{for(i=2;i<=NF;){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