Advertisement
hakonhagland

Update: Caller

Mar 17th, 2014
401
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.40 KB | None | 0 0
  1. BEGIN {FS="|"; num="10000027"}
  2. {
  3. if ($4==num) {a[$5]++; b[$5]+=$3}
  4. }
  5.  
  6. END {
  7. for (i in a) {
  8. if (a[i]>max) {
  9. max=a[i]
  10. c=i;
  11. }
  12. }
  13. for (i in b) {
  14. if (b[i]>max2) {
  15. max2=b[i]
  16. c2=i;
  17. }
  18.  
  19. }
  20. print "Caller: "c" called "num" "max" times."
  21. print "Caller: "c2" called "num" for "max2" seconds."
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement