07-17-2014, 07:03 PM
Hi,
here a little GS log filtering shell.
Its very old but i think it can help some new guys.
I think its self explanatory.
[hide]
#!/bin/sh
echo "###############################################################################"
#Var
LOG1=Log140101000716
LOG2=Log140101000716
LOG3=Log140101000716
LOG4=Log140101000716
LOG5=Log140101000716
LOG6=Log140101000716
DIR=/home/Server/GameServer/LogFiles
DIR2=/home/Server/Log_GM.txt
DIR3=/home/Server/Log_Hack.txt
echo "###############################################################################"
rm Log_GM.txt
rm Log_Hack.txt
touch Log_GM.txt
touch Log_Hack.txt
find $DIR -type f -name $LOG1 | xargs grep 'GM COMMAND' >> $DIR2;
find $DIR-type f -name $LOG2 | xargs grep 'GM COMMAND' >> $DIR2;
find $DIR-type f -name $LOG3 | xargs grep 'GM COMMAND' >> $DIR2;
find $DIR-type f -name $LOG1 | xargs grep 'HACK ATTACK' >> $DIR3;
find $DIR-type f -name $LOG2 | xargs grep 'HACK ATTACK' >> $DIR3;
find $DIR-type f -name $LOG3 | xargs grep 'HACK ATTACK' >> $DIR3;
find $DIR-type f -name $LOG1 | xargs grep 'GO ZONE FAILED' >> $DIR3;
find $DIR-type f -name $LOG2 | xargs grep 'GO ZONE FAILED' >> $DIR3;
find $DIR-type f -name $LOG3 | xargs grep 'GO ZONE FAILED' >> $DIR3;
find $DIR-type f -name $LOG1 | xargs grep 'HACK MOVE' >> $DIR3;
find $DIR-type f -name $LOG2 | xargs grep 'HACK MOVE' >> $DIR3;
find $DIR-type f -name $LOG3 | xargs grep 'HACK MOVE' >> $DIR3;
clear
[/hide]
Salute,
peter

