标签:awk
数组states[$NF],格式输出printf,注意循环结构范围{}
nginx日志格式
分状态码查看流量
awk ‘{StatesCode[$9]+=$10}END{printf ("StateCode ------ SIZE(bytes)\n");for (i in StatesCode) printf ("%8s%18s\n",i,StatesCode[i])}‘ access.log
awk笔记
原文地址:http://liuchw.blog.51cto.com/6858799/1558587