Skip to content

Instantly share code, notes, and snippets.

Created August 2, 2014 07:31
Show Gist options
  • Save anonymous/a646648589a7820b488b to your computer and use it in GitHub Desktop.
Save anonymous/a646648589a7820b488b to your computer and use it in GitHub Desktop.
$ cat result| awk -F'[ -]' '{result[$1" win"]+=($3>$4)?1:0;result[$2" win"]+=($4>$3)?1:0;result[$1" lost"]+=($3<$4)?1:0;result[$2" lost"]+=($4<$3)?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