Wikiaenderung mit diesem Script zaehlen

This commit is contained in:
age 2006-07-18 23:31:46 +00:00
parent 4c316c7874
commit 10a6bd6a7f

View file

@ -0,0 +1,17 @@
#!/bin/sh
set -e
## this script counts wiki changes, done since the time it was last started
WIKIS="/data/moin/sites/"
STATS[0]="Auflistung der veraenderten Seiten je Wiki:\n"
i=1
for wiki in `ls $WIKIS`; do
countnew=`wc -l ${WIKIS}/${wiki}/edit-log | cut -d" " -f1`
countold=`wc -l ${WIKIS}/${wiki}/edit-log.old | cut -d" " -f1`
changes=$[${countnew}-${countold}]
STATS[$i]="\t${changes}\t${wiki}\n"
((i++))
#cp ${WIKIS}/${wiki}/edit-log ${WIKIS}/${wiki}/edit-log.old
done
echo -e ${STATS[@]}
#echo -e ${STATS[@]} | mail -s "[wikicounter] TEST aktuelle Aenderungen" wikis@admin.systemausfall.org