# NanoBlogger Total Vists Plugin # gets hits on /blog from apache access logs # # sample code for templates - based on default stylesheet # #
# Total visits (last year): $TOTAL_VISITS #
nb_msg "generating last visits ..." TOTAL_VISITS=0 for log in $ACCESS_LOG; do TOTAL_VISITS=$(($TOTAL_VISITS + $(zgrep -c -h "GET /blog/ " $log))) done