From b3128c6abaeb609cb4a1fbe63bcb4549490489db Mon Sep 17 00:00:00 2001 From: age Date: Tue, 12 Jul 2005 23:05:03 +0000 Subject: [PATCH] --- spielspass/logkosmetik.sh | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100755 spielspass/logkosmetik.sh diff --git a/spielspass/logkosmetik.sh b/spielspass/logkosmetik.sh new file mode 100755 index 0000000..537d8b6 --- /dev/null +++ b/spielspass/logkosmetik.sh @@ -0,0 +1,25 @@ +#!/bin/bash +set -u + +VERSIONS="17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0" +SRC="logs/access.log" +DEST="access.log.all" + +#[ -e ${SRC}.1.gz ] && gzip $SRC ${SRC}.1.gz + +rm $DEST +for vers in ${VERSIONS[@]} +do + file=${SRC}.${vers}.gz + echo $file + zcat $file >> $DEST + echo -e "\n" >> $DEST +done + +sed '/Python-urllib/d' $DEST > ${DEST}.a +sed '/\"Wget\/1\.9\.1\"/d' $DEST.a > ${DEST}.b +sed '/U\;\ Nessus/d' $DEST.b > ${DEST}.c +sed '/action=rss/d' $DEST.c > ${DEST}.d +sed 's/^/127.0.0.1 /' $DEST.d > ${DEST}.e + +