Wikiaenderung mit diesem Script zaehlen
This commit is contained in:
parent
4c316c7874
commit
10a6bd6a7f
1 changed files with 17 additions and 0 deletions
17
spielspass/count_wikichanges.sh
Normal file
17
spielspass/count_wikichanges.sh
Normal 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
|
||||||
|
|
Loading…
Reference in a new issue