Last active
August 29, 2015 14:06
-
-
Save beunwa/af45c453ce128e97f39c to your computer and use it in GitHub Desktop.
extract des visites google depuis les logs apache et le transforme en csv
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
awk '{if($14 ~ /Googlebot/) {print $7}}' apache.log | sort | uniq -c | sort -n | tail -40 | sed 's/^[ \t]*//;s/[ \t]*$//' > top40google.csv | |
more apache.log | grep Googlebot | awk {'split($4, a, ":"); split(a[1], a, "["); print a[2]'} | sort | uniq -c | sed 's/^[ \t]*//;s/[ \t]*$//' > google-visits-per_day.csv | |
more apache.log | grep Googlebot | awk {'print $7'} | sort | uniq -c | wc -l |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment