mirror of
https://github.com/eclipse-sailing-analytics/sailing-analytics.git
synced 2026-09-25 06:58:39 +00:00
17 lines
665 B
Bash
Executable File
17 lines
665 B
Bash
Executable File
#!/bin/bash
|
|
|
|
CACHE=/var/log/old/cache/unique-ips-per-referrer
|
|
VISITED_FILES=$CACHE/visited
|
|
STATS=$CACHE/stats
|
|
MONTHS=$STATS/months
|
|
|
|
for month in `cat $MONTHS`; do
|
|
for i in ${STATS}/*.ips; do
|
|
echo -n "`basename $i .ips` "
|
|
cat $i | grep "^[^ ]* [0-9]*/$month .*" | sort -u | wc | awk '{ print $1; }'
|
|
# TODO consider producing an AWStats configuration file for each virtual host name and splitting all new logs into virtual host name-specific log files
|
|
done | tee $STATS/unique-ips-days-useragents-per-event-`echo $month | tr / -`
|
|
echo "Wrote per-month results to $STATS/unique-ips-days-useragents-per-event-`echo $month | tr / -`"
|
|
done
|
|
echo "Done."
|