remove trailing spaces

This commit is contained in:
Pierre-Louis Bonicoli 2024-06-17 01:51:44 +02:00
parent 0c75469fec
commit f8c31523c9
Signed by: pilou
GPG Key ID: 06914C4A5EDAA6DD

View File

@ -49,7 +49,7 @@ generateHTTPReport()
echo "=§= Rapport d'activité HTTP"
echo
local httpRequestCount=$(zgrep "$monthEnglish" $LOG_PREFIX-access.log*|grep $year|wc -l)
echo "Nombre total de requêtes http = $httpRequestCount"
@ -64,7 +64,7 @@ generateHTTPReport()
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 )
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 )
echo "Nombre d'ipv6 ayant visité le service = $ipv6VisitorCount"
@ -85,7 +85,7 @@ generateSpecificReport()
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 )
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 )
echo "Nombre d'ipv6 utilisatrices du service = $ipv6UserCount"
@ -117,7 +117,7 @@ generateSpecificReport()
publicOrganizationCount=0
fi
echo "Nombre d'organisations publiques = $publicOrganizationCount"
local repositoryCount=$(curl -s --dump-header - "https://forge.chapril.org/api/v1/repos/search?limit=1&token=$GITEA_API_KEY" | grep "X-Total-Count\:" | awk '{ print $2 }' | jq '.')
echo "Nombre de dépôts = $repositoryCount"
@ -132,7 +132,7 @@ generateSpecificReport()
local fileCount=$(find "$GITEA_REPO_HOME" -type f | wc -l )
echo "Nombre de fichiers de l'espace disque = $fileCount"
local totalFileCount=$(find "$GITEA_REPO_HOME" | wc -l )
echo "Nombre total de fichiers de l'espace disque = $totalFileCount"
@ -192,7 +192,7 @@ elif [ "$#" -eq 2 ]; then
yearMonth="$2-0$1"
else
yearMonth="$2-$1"
fi
fi
monthEnglish=$(LANG=en_EN.UTF-8;date -d "$2-$1-01" +%b)
year="$2"
generateReport "$monthEnglish" "$year" "$yearMonth"