- 论坛徽章:
- 32
|
根据你提供的数据:- [root@localhost ~]# awk '{appid=gensub(/.*appid=([^&]*).*/,"\\1",1);areaid=gensub(/.*areaid=([^&]*).*/,"\\1",1);type=gensub(/.*type=([^&]*).*/,"\\1",1);IP=$1;a[appid]++;b[appid]=b[appid]?b[appid]" "areaid:areaid;c[appid]=c[appid]?c[appid]" "type:type;d[IP]++}END{for(i in a){printf "appid: %s\nnumber of request: %d\nareaid of request: %s\ntype of request: %s\n\n",i,a[i],b[i],c[i]}for(i in d)print i,d[i]}' i
- appid: 7cfdf9
- number of request: 1
- areaid of request: 101243506
- type of request: observe
- appid: 7fde98
- number of request: 1
- areaid of request: 329103324
- type of request: observe
- 61.4.184.91 1
- 61.4.184.92 1
- [root@localhost ~]#
复制代码 |
|