From 6eec5b7b00482ce8f6359f8459422277ec8dc470 Mon Sep 17 00:00:00 2001 From: age Date: Tue, 25 Jul 2006 21:34:27 +0000 Subject: [PATCH] sao jetzt auch mit mailinglisten counter --- spielspass/count_mailinglistchanges.sh | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/spielspass/count_mailinglistchanges.sh b/spielspass/count_mailinglistchanges.sh index de5f913..9c0608f 100644 --- a/spielspass/count_mailinglistchanges.sh +++ b/spielspass/count_mailinglistchanges.sh @@ -1 +1,18 @@ -blafooball +#!/bin/sh +set -e +LISTPATH="/data/lists/" +STATS[0]="Mailinglisten Verkehr:\n" +i=1 +for list in `ls ${LISTPATH}`; do +#for list in "/data/lists/svn-codekasten" do + if [ -r ${list}/num ]; then + countnew=`cut -d ":" -f1 ${list}/num` + countold=`cut -d ":" -f1 ${list}/num.old` + changes=$[${countnew}-${countold}] + STATS[$i]="\t${changes}\t${list}\n" + ((i++)) + cp ${list}/num ${list}/num.old + fi +done +#echo -e ${STATS[@]} +echo -e ${STATS[@]} | mail -s "[counter] aktuelle Aenderungen" qmail@admin.systemausfall.org