madasafish
Technical User
Code:
gawk ' BEGIN { sitea=0 ; siteb=0 }
{
if ($1 ~ "192.168.6") { sitea++ } else { siteb++ }
x[sitea","siteb","$7","$9]
}
END {
for (i in x)
print i
}' $FILE
No doubt and probably needless to say, the above code does not give me the required result.
It is reading an apache access log and I am seeking TOTAL http hits for "sitea" and TOTAL http hits for "siteb"
Example report:
SITEA,SITEB,URL,HTTP Response Code,
29,53,/apps/tube/icon_Tube.png,200
60,102,/apps/mix/icon_mix.png,200
389,536,/publish/images/vpl.png,404
etc....
As always thanks in advance,
Madasafish