Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/awk -f
- { if ($2 < 30) { team[$1]["active"] += $2 + 60 }
- else { team[$1]["active"] += $2 }
- team[$1]["result"] += $3
- }
- END {
- for (i in team) {
- printf "%d %d %d\n", i, team[i]["active"], team[i]["result"]
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement