diff --git a/rapport_activite/rapport_activite.sh b/rapport_activite/rapport_activite.sh index 11a443c..3eb848b 100755 --- a/rapport_activite/rapport_activite.sh +++ b/rapport_activite/rapport_activite.sh @@ -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)