awk "sort -rnk3"
quot Sort awk
2023-09-11 14:20:31 时间
[root@Cobbler logs]# awk 'BEGIN{print "IP地址","访问流量","访问次数"}{a[$1]++;b[$1]+=$10}END{for (i in a) print i,a[i],b[i]|"sort -rnk3"}' access_log
IP地址 访问流量 访问次数
172.16.1.101 982 844856636
172.16.1.62 976 476278648
172.16.1.21 976 476278648
172.16.1.168 976 476278648
172.16.1.100 6 368578459
172.16.1.104 6 368578451
相关文章
- C/C++ #include<> 和 #include""的区别
- idea报错 "cannot access ..."的解决办法
- SQL疑难杂症【3】链接服务器提示"无法启动分布式事物"
- C# 代码实现设置用户"NETWORK SERVICE"具有对文件夹的读取权限。
- Exception in thread "taskExecutor-4" java.lang.AbstractMethodError: com.mchange.v2.c3p0.impl.NewProx
- sublime text使用正则表达式批量给KV加" "
- SAP UI5 "patternYYY" : "detailZZZ/{contextPath}" - navigation test
- [WARNING] The requested profile "pom.xml" could not be activated because it does not exist.
- "高可用方案工具包" high availability toolkit 1.1
- js在方法Ajax请求数据来推断,验证无效(OnClientClick="return Method();"),或者直接运行的代码隐藏