Skip to content

Instantly share code, notes, and snippets.

Created August 2, 2014 07:28
Show Gist options
  • Save anonymous/6c4b8cf7a4ae6a0ef839 to your computer and use it in GitHub Desktop.
Save anonymous/6c4b8cf7a4ae6a0ef839 to your computer and use it in GitHub Desktop.
$ cat result| awk -F'[ -]' '{result[$1" win"]+=($1>$2)?1:0;result[$2" win"]+=($2>$1)?1:0;result[$1" lost"]+=($1<$2)?1:0;result[$2" lost"]+=($2<$1)?1:0;}END{for(i in result){print i, result[i]}}' | sort -k1,1 | xargs -n 6 | awk '{print $1, $3"-"$6}'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment