Thanks "olded", this is a great start. Now I just need help to make the output sorted in the order I need (see my original message). Any hints to do this? Thanks again!
Hi, I'm really new at awk/gawk/nawk and need help with what must be a simple problem, I have a test-inputdata set like this:
1 1
1 2
1 5
2 5
2 6
2 7
3 2
3 3
3 4
.
.
.
500 9
500 2
500 3
and I want the sum of all data with the same $1 (in other words when $1=1 sum up 1+2+5 (=8), when...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.