Skip to content

Commit 11e8146

Browse files
committed
data aggregation example 1
1 parent 005acec commit 11e8146

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

aggregation.awk

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Data aggregation
2+
# Compute how many bytes per IP are processed.
3+
# Example: awk klashxx$ awk -f aggregation.awk files/ips.dat
4+
#
5+
6+
NR>1{
7+
ips[$1]+=$2
8+
}
9+
END{
10+
for (ip in ips){
11+
print ip, ips[ip]
12+
}
13+
}

0 commit comments

Comments
 (0)