I am looking for a comparison in 2 commands using awk and cut that would replicate the following command below.
This is completely for speed reasons checking apache logs for unique IPs.
Contender #1
awk '{!a[$1]++}END{for(i in a) if ( a >10 ) print a,i }' access_log
I need a string / command that is similar to the above awk command that performs the same checking using CUT. It should disregard UNIQUE apache access log IP'S that exceed lower than 10 entries on the the access logs unique IPs.
I need to modify below command to achieve this. My co worker and I have a bet.
Yes,
I am trying to see what command is the fastest at performing the task of searching trough a large apache access log.
I have had some opinions in regards to cut and awk performing the seaarch and revealing of results. These test are from bash on RHEL.
I feel that the awk command is superior. However I will need to confirm that cause the cut command that I constructed is missing the portion where it checks for duplicate IP's less than 10 on the infile. And to be completely honest I cannot construct a CUT command that will achieve this.