#!/bin/bash

for AttribLog in $(for ZoneServerDir in $(ls -tr ~/servers*|grep ZoneServer);do ls -tr ~/servers*/$ZoneServerDir/Attrib*|tail -2;done);do LC_ALL=C sed ':x;N;$!bx;s/\n/|/g;s/|\([\x30\x31\x32\x33\x34\x35\x36\x37\x38\x39\x20]\)/\n\1/g' $AttribLog|egrep -h "$(date -d "-1 hour" +"%Y/%m/%d %H:").....,EXP:[0-9]+|$(date -d "-2 hour" +"%Y/%m/%d %H:").....,EXP:[0-9]+|$(date +"%Y/%m/%d %H:").....,EXP:[0-9]+"|awk -F, '{print $4","$(NF-1)","$NF}'|sort|uniq -cd;done
