题解 | #Nginx日志分析1-IP访问次数统计#
Nginx日志分析1-IP访问次数统计
https://www.nowcoder.com/practice/3f2f45c74a1b415db17234f9cfd51469
#!/bin/bash #grep -E "23\/Apr\/2020" "./nowcoder.txt" | awk -F ' ' ' { list[$1]++ } END{ for(i in list){ print list[i]" "i } } ' | sort -k1 -r -n awk '/23\/Apr\/2020/{list[$1]++;}END{for(i in list){print list[i]" "i;}}' "./nowcoder.txt" | sort -k1 -n -r