2011-06-29 00:50:27 -07:00
|
|
|
#!/usr/bin/awk -f
|
|
|
|
|
2011-06-14 01:20:51 -07:00
|
|
|
#release/decks/LSK_RW.dec RND 6 release/decks/LSK_RW.dec VEGAS 6 10 0 10
|
|
|
|
#release/decks/LSK_RW.dec RND 6 release/decks/LSK_RW.dec VEGAS 6 10 3 7
|
2011-06-10 05:32:53 -07:00
|
|
|
|
|
|
|
BEGIN {
|
|
|
|
FS = "\t"
|
|
|
|
OFS = "\t"
|
|
|
|
}
|
|
|
|
|
2011-07-03 05:22:29 -07:00
|
|
|
NF == 9 {
|
|
|
|
if ($8 + $9 > win[$2] + lose[$2]) {
|
|
|
|
s1[$2] -= win[$2]
|
|
|
|
s2[$2] -= lose[$2]
|
2011-06-11 23:57:05 -07:00
|
|
|
}
|
2011-07-03 05:22:29 -07:00
|
|
|
win[$2] = $8
|
|
|
|
lose[$2] = $9
|
|
|
|
s1[$2] += win[$2]
|
|
|
|
s2[$2] += lose[$2]
|
2011-06-10 05:32:53 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
END {
|
2011-07-03 05:22:29 -07:00
|
|
|
for (ai in s1) {
|
|
|
|
total = s1[ai] + s2[ai]
|
|
|
|
print "Total = " total
|
|
|
|
print ai, s1[ai], s2[ai], s1[ai]*100/total
|
|
|
|
}
|
2011-06-10 05:32:53 -07:00
|
|
|
}
|
|
|
|
|