BEGIN { FS = "\t"; } function esc(s) { gsub(/&/, "&", s); gsub(/, "<", s); gsub(/>/, ">", s); return s; } { tanks[i++] = $1; reason[$1] = $3; killer[$1] = $4; errchar[$1] = $5; lasterr[$1] = $6; kills[$4] += 1; getline < ($2 "/name"); name[$1] = $0; } END { print "
Name | Kills | Cause of Death | Killer | Last Error | Parse error @ |
---|---|---|---|---|---|
" esc(name[me]) " | "; print "" kills[me] " | "; print "" reason[me] " | "; print "" esc(name[killer[me]]) " | "; print "" lasterr[me] " | "; print "" errchar[me] " | "; print "