Operating System - Linux
1828926 Members
2913 Online
109986 Solutions
New Discussion

Re: Counting using awk script

 
debian111
Regular Advisor

Counting using awk script

Hi all,

I have folloving situation

fileA something like

x1 x2 x3 x4 x5 x6 x7
33 324 43 5454 54 54 545
345 55 5 4233 4 4 4
...........................
............................
x4 column represents phone numbers fied, and column x5 represents how many calls were sent to that number. Other fields are not interested. Using awk I have to calculate how many calls were past to every phone number. In output file I have to get something like bellow

x4 x5
5454 54
3244 4
... ...
... ...

and so on for every phone number.

I can sort phone numbers to files and numbers of calls, but I do not know how to count calls for every particular number.

If someone know, or have some hint how to do this, please write it down.

Regards
1 REPLY 1
spex
Honored Contributor

Re: Counting using awk script

Hi,

I thought your problem rang a bell. Sandman's response in this thread:

http://forums1.itrc.hp.com/service/forums/bizsupport/questionanswer.do?threadId=1039717

is exactly what you are looking for.

PCS