# 实时统计
## 方式一
tail -f access.log | awk -F '[' {print $2}' | awk BEGIN{key="";count=0}{if(key==$1){count++}else{printf("%s\t%d\r\n",key,count);count=1;key=$1}}'
tail -f access.log | awk -F '[' {print $2}' | awk BEGIN{key="";count=0}{if(key==$1){count++}else{printf("%s\t%d\r\n",key,count);count=1;key=$1}}'