Use 'grep -c' instead of 'wc -l'
This commit is contained in:
parent
4c8d0de5ba
commit
9f6b588083
@ -50,10 +50,10 @@ generateHTTPReport()
|
||||
echo "=§= Rapport d'activité HTTP"
|
||||
echo
|
||||
|
||||
local httpRequestCount=$(zgrep "$monthEnglish" $LOG_PREFIX-access.log*|grep $year|wc -l)
|
||||
local httpRequestCount=$(zgrep "$monthEnglish" $LOG_PREFIX-access.log*|grep -c $year)
|
||||
echo "Nombre total de requêtes http = $httpRequestCount"
|
||||
|
||||
local trueHttpRequestCount=$(zgrep "$monthEnglish" $LOG_PREFIX-access.log*|grep $year|grep -vi bot|grep -v check_http|wc -l)
|
||||
local trueHttpRequestCount=$(zgrep "$monthEnglish" $LOG_PREFIX-access.log*|grep $year|grep -vi bot|grep -c -v check_http)
|
||||
echo "Nombre de vraies requêtes http = $trueHttpRequestCount"
|
||||
|
||||
local botRequestCount=$(zgrep "$monthEnglish" $LOG_PREFIX-access.log*|grep "$year"|grep -i bot|grep -c -v check_http)
|
||||
|
Loading…
Reference in New Issue
Block a user