AnotherAlan
Technical User
Hi all,
I am using the below awk line to total the byte count per client, but would like to include another column that sums the number of incidences of each client in $3.
awk '{t[$3]+=$11}END{for(i in t)print i,t|"sort -n"}'
Expected output would be;
client1 <byte count> <number of times client1 present>
client2 <byte count> <number of times client2 present>
...
I can then use these figures to produce a rolling average.
I am way too inexperienced with awk to figure this out.
Any help would be much appreciated.
Thanks
Alan
I am using the below awk line to total the byte count per client, but would like to include another column that sums the number of incidences of each client in $3.
awk '{t[$3]+=$11}END{for(i in t)print i,t|"sort -n"}'
Expected output would be;
client1 <byte count> <number of times client1 present>
client2 <byte count> <number of times client2 present>
...
I can then use these figures to produce a rolling average.
I am way too inexperienced with awk to figure this out.
Any help would be much appreciated.
Thanks
Alan