Add the values of the lines according to a condition
I am a beginner in bash and I want to convert the result I have here
I want it to be grouped by IP address
so iwanna get for each ip adsress the addition of all bandwidth where ip is 184.108.40.206
in other words for 220.127.116.11 it groups me all the values whose ip address is 18.104.22.168
is it possible?
I have a few to questions pose in response first:-
What have you tried so far?
What output/errors do you get?
What OS and version are you using?
What are your preferred tools? (C, shell, perl, awk, etc.)
What logical process have you considered? (to help steer us to follow what you are trying to achieve)
Most importantly, What have you tried so far?
There are probably many ways to achieve most tasks, so giving us an idea of your style and thoughts will help us guide you to an answer most suitable to you so you can adjust it to suit your needs in future.
We're all here to learn and getting the relevant information will help us all.
but i have no idea how to do the rest
i have the idea but i don't know how to apply it
i dont even know if it's possible to do a loop that verify in the second column and and show me for each ip the total of the corresponding number
Last edited by vgersh99; 04-20-2018 at 10:56 AM..
Reason: code tags, please!