I have a file formatted like:

```
10.0.0.1        87.220.150.64   131
10.0.0.1        87.220.172.219  131
10.0.0.1        87.220.74.162   131
10.0.0.1        87.220.83.17    58
10.0.0.1        87.220.83.17    58
1.160.138.209   10.0.0.249      177
1.160.138.209   10.0.0.249      354
1.160.138.249   10.0.0.124      296
1.160.139.125   10.0.0.252      129
1.160.139.207   10.0.0.142      46

```

The first and the second columns are IP addresses and the third one is the bytes transferred between IPs. I have to count how many bytes each 10.something IP-address has sent or received.

I used following awk program to calculate how many bytes each IP had sent but I cant figure out how to edit it to also calculate the received bytes.

```
awk '{ a[$1 " " $2] += $3 } END { for (i in a) { print i " " a[i] } }' input.txt | sort -n

```