ㅇ 특정날짜의 접속IP 합계
cat localhost_access_log.2021-07-02.txt | awk '{print $1 " " $9}' | grep ' 200' | awk '{arr[$1]+=1} END { for(i in arr) { print i "\t" ":" arr[i]}}' | awk '{sum +=1} END { print sum "\t" }'
ㅇ Response Header가 200으로 성공한 접속IP 찾기
cat localhost_access_log.2021-07-05.txt | awk '{print $1 " " $9}' | grep ' 200' | awk '{arr[$1]+=1} END { for(i in arr) { print i "\t" ":" arr[i]}}' | sort
ㅇ 접속IP별 접속합계
cat localhost_access_log.2021-07-05.txt | awk '{print $1}' | awk '{arr[$1]+=1} END { for(i in arr) { print i "\t" ":" arr[i]}}'
ㅇ Response Header 별 접속합계
cat localhost_access_log.2021-07-01.txt | awk '{print $9}' | awk '{arr[$1]+=1} END { for(i in arr) { print i "\t" ":" arr[i]}}'