[cig-commits] r5609 - cs/stats/trunk
sue at geodynamics.org
sue at geodynamics.org
Wed Dec 20 22:50:05 PST 2006
Author: sue
Date: 2006-12-20 22:50:05 -0800 (Wed, 20 Dec 2006)
New Revision: 5609
Added:
cs/stats/trunk/rm_empty
Modified:
cs/stats/trunk/get_all_times
cs/stats/trunk/get_names
cs/stats/trunk/get_users
cs/stats/trunk/master_control
Log:
Fix many minor bugs
Modified: cs/stats/trunk/get_all_times
===================================================================
--- cs/stats/trunk/get_all_times 2006-12-20 22:13:44 UTC (rev 5608)
+++ cs/stats/trunk/get_all_times 2006-12-21 06:50:05 UTC (rev 5609)
@@ -1,5 +1,5 @@
for month in `cat months`; do
for year in `cat years`; do
- ./get_names $1 $month $year > $2_$month_$year
+ ./get_names ${1} ${month}/${year} > $2_${month}_${year}
done
done
Modified: cs/stats/trunk/get_names
===================================================================
--- cs/stats/trunk/get_names 2006-12-20 22:13:44 UTC (rev 5608)
+++ cs/stats/trunk/get_names 2006-12-21 06:50:05 UTC (rev 5609)
@@ -1 +1 @@
-zgrep -h $2 /var/lib/zope2.7/instance/plone/log/Z2.log* | grep $3 | grep $1 | grep -v bot | grep -v spider | grep -v "Yahoo! Slurp" | grep -v "^131\.215" | awk '{print $1}' | sort | uniq
+zgrep -h $2 /var/lib/zope2.7/instance/plone/log/Z2.log* | grep $1 | grep -v bot | grep -v spider | grep -v "Yahoo! Slurp" | grep -v "^131\.215" | grep -v "^127.0.0.1" | awk '{print $1}' | sort | uniq
Modified: cs/stats/trunk/get_users
===================================================================
--- cs/stats/trunk/get_users 2006-12-20 22:13:44 UTC (rev 5608)
+++ cs/stats/trunk/get_users 2006-12-21 06:50:05 UTC (rev 5609)
@@ -1,13 +1,13 @@
rm -f users
rm -f institutions
-for p in `ls *_Jan`; do
- project=`echo $p | cut -d _ -f 1`
+for p in `ls *_Jan_2006`; do
+ project=`echo $p | rev | cut -d _ -f 3- | rev`
rm -f ${project}_users ${project}_institutions ${project}_total_users
for month in `cat months`; do
for year in `cat years`; do
- wc -l ${project}_$month_$year | cut -f 1 -d " " >> ${project}_users
+ wc -l ${project}_${month}_${year} | cut -f 1 -d " " >> ${project}_users
rm -f users
- for f in `cat ${project}_$month_$year`; do
+ for f in `cat ${project}_${month}_${year}`; do
whois $f >> ${project}_institutions_raw
echo "-------------------------------------------" >> ${project}_institutions_raw
whois $f | md5sum >> users
@@ -16,10 +16,10 @@
done
done
- cat ${project}_[A-Z][a-z][a-z] | sort | uniq | wc -l >> ${project}_total_users
+ cat ${project}_[A-Z][a-z][a-z]_200[6-9] | sort | uniq | wc -l >> ${project}_total_users
done
-cat *_[A-Z][a-z][a-z] | sort | uniq > users
+cat *_[A-Z][a-z][a-z]_200[6-9] | sort | uniq > users
rm -f institutions_tmp
for f in `cat users`; do
whois $f | md5sum >> institutions_tmp
Modified: cs/stats/trunk/master_control
===================================================================
--- cs/stats/trunk/master_control 2006-12-20 22:13:44 UTC (rev 5608)
+++ cs/stats/trunk/master_control 2006-12-21 06:50:05 UTC (rev 5609)
@@ -2,6 +2,7 @@
./get_users
./make_plots
mkdir -p /home/sue/public_html/stats/plots
+./rm_empty
cp *_users /home/sue/public_html/stats
cp *_institutions /home/sue/public_html/stats
cp *.png /home/sue/public_html/stats/plots
Added: cs/stats/trunk/rm_empty
===================================================================
--- cs/stats/trunk/rm_empty 2006-12-20 22:13:44 UTC (rev 5608)
+++ cs/stats/trunk/rm_empty 2006-12-21 06:50:05 UTC (rev 5609)
@@ -0,0 +1,5 @@
+for f in `ls`; do
+ if [ -z "`cat $f`" ]; then
+ rm -f $f
+ fi
+done
Property changes on: cs/stats/trunk/rm_empty
___________________________________________________________________
Name: svn:executable
+ *
More information about the cig-commits
mailing list