#!/bin/bash
#edit: www.jb200.com
#
date1=`date -d "$date1" +%Y%H%M`
logpath="access.log"
cat $logpath |
linuxjishu/13830.html target=_blank class=infotextkey>awk -v now=$date1 'BEGIN{count=0}{if(match($4,'/\/[0-9:]+/')){ date=substr($4,RSTART+1,10);if(date>=now && match($10,"500")){count=count+1;}}} END{print count}'