Avoid deprecated variant egrep, use grep
with the related option instead.
This commit is contained in:
parent
9f6b588083
commit
3e30a986bc
@ -62,10 +62,10 @@ generateHTTPReport()
|
||||
local errorRequestCount=$(zgrep "$monthEnglish" $LOG_PREFIX-error.log*|grep -c "$year")
|
||||
echo "Nombre de requêtes http en erreur = $errorRequestCount"
|
||||
|
||||
local ipv4VisitorCount=$(zgrep -h "$monthEnglish" $LOG_PREFIX-access.log*|grep "$year"|grep -vi bot|grep -v check_http|egrep "^$IPV4_PATTERN "|cut -d' ' -f1|sort|uniq|wc -l )
|
||||
local ipv4VisitorCount=$(zgrep -h "$monthEnglish" $LOG_PREFIX-access.log*|grep "$year"|grep -vi bot|grep -v check_http|grep -E "^$IPV4_PATTERN "|cut -d' ' -f1|sort|uniq|wc -l )
|
||||
echo "Nombre d'ipv4 ayant visité le service = $ipv4VisitorCount"
|
||||
|
||||
local ipv6VisitorCount=$(zgrep -h "$monthEnglish" $LOG_PREFIX-access.log*|grep "$year"|grep -vi bot|grep -v check_http|egrep "^$IPV6_PATTERN "|cut -d' ' -f1|sort|uniq|wc -l )
|
||||
local ipv6VisitorCount=$(zgrep -h "$monthEnglish" $LOG_PREFIX-access.log*|grep "$year"|grep -vi bot|grep -v check_http|grep -E "^$IPV6_PATTERN "|cut -d' ' -f1|sort|uniq|wc -l )
|
||||
echo "Nombre d'ipv6 ayant visité le service = $ipv6VisitorCount"
|
||||
|
||||
echo "Nombre total d'ip ayant visité le service = $((ipv4VisitorCount+ipv6VisitorCount))"
|
||||
@ -83,10 +83,10 @@ generateSpecificReport()
|
||||
echo "=§= Rapport d'activité spécifique"
|
||||
echo
|
||||
|
||||
ipv4UserCount=$(zgrep -h "$monthEnglish" $LOG_PREFIX-access.log*|grep "$year"|grep -vi bot|grep -v check_http|egrep "^$IPV4_PATTERN " | cut -d' ' -f 1|sort|uniq|wc -l )
|
||||
ipv4UserCount=$(zgrep -h "$monthEnglish" $LOG_PREFIX-access.log*|grep "$year"|grep -vi bot|grep -v check_http|grep -E "^$IPV4_PATTERN " | cut -d' ' -f 1|sort|uniq|wc -l )
|
||||
echo "Nombre d'ipv4 utilisatrices du service = $ipv4UserCount"
|
||||
|
||||
ipv6UserCount=$(zgrep -h "$monthEnglish" $LOG_PREFIX-access.log*|grep "$year"|grep -vi bot|gre\p -v check_http|egrep "^$IPV6_PATTERN " | cut -d' ' -f 1|sort|uniq|wc -l )
|
||||
ipv6UserCount=$(zgrep -h "$monthEnglish" $LOG_PREFIX-access.log*|grep "$year"|grep -vi bot|grep -v check_http|grep -E "^$IPV6_PATTERN " | cut -d' ' -f 1|sort|uniq|wc -l )
|
||||
echo "Nombre d'ipv6 utilisatrices du service = $ipv6UserCount"
|
||||
|
||||
echo "Nombre total d'ip utilisatrices du service = $((ipv4UserCount+ipv6UserCount))"
|
||||
|
Loading…
Reference in New Issue
Block a user