Created
June 16, 2020 06:10
-
-
Save emanuelvintila/41188210a3d9fb1ab2ae1074a9a2068e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env awk -f | |
{ | |
suma_gr[$2] += $5 | |
count_gr[$2]++ | |
suma_an[$1] += $5 | |
count_an[$1]++ | |
} | |
END { | |
for (gr in suma_gr) { | |
print gr, suma_gr[gr] / count_gr[gr] | |
} | |
for (an in suma_an) { | |
print an, suma_an[an] / count_an[an] | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment