View Single Post
Old 09-11-2017, 11:33 AM  
wocnom
Confirmed User
 
wocnom's Avatar
 
Industry Role:
Join Date: Jan 2013
Posts: 132

Quote:
Originally Posted by Barry-xlovecam View Post
Code:
zcat access.log.gz|egrep '='| egrep -v 'l=|"-"'| grep 'google' |wc -l =Google	2450
									
zcat access.log.gz|egrep '='| egrep -v 'l=|"-"'| grep 'yahoo' |wc -l =Yahoo!	5104
									
zcat access.log.gz|egrep '='| egrep -v 'l=|"-"'| grep 'bing' |wc -l =Bing	9128
									
zcat access.log.gz|egrep '='| egrep -v 'l=|"-"'| grep 'yandex' |wc -l  =Yandex 3531
Do you know, that using zcat and wc is surplus? zgrep actually should do all the work you need itself:
Code:
zgrep -e $match -ve $dont_match -c $log_file
To the patterns - I think you actually can miss some traffic or match the bots in useragent part of http request. Just sayin'.

And to the results... yahoo is actually using bing search engine, so you the mass traffic is going from bing. Is that really difference? (meaning as the majority souce in your case is bing instead of google)
wocnom is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote