#!/bin/bash
YY=`date -R | cut -c 13-16`
MM=`date -R | cut -c 9-11`
DD=`date -R | cut -c 6-7`
TIME=$DD/$MM/$YY
echo $TIME
cat /usr/local/apache/logs/access_log | grep "$TIME" | awk '{print $1}' | awk '{arr[$0]++} END{ for (IP in arr) print IP, "-->",arr[IP] }'
阅读(470) | 评论(0) | 转发(0) |