Compare commits
2 Commits
d045705044
...
d7cbea4f00
Author | SHA1 | Date | |
---|---|---|---|
d7cbea4f00 | |||
cdf272edb6 |
|
@ -83,14 +83,6 @@ generateHTTPReport()
|
|||
echo
|
||||
}
|
||||
|
||||
# display the value of a key in the json fetched with curl
|
||||
function show
|
||||
{
|
||||
# to navigate to sub keys like data.statistics.my_key , we must use multiple -e extract options
|
||||
local value=$(echo "$json" | jshon -e "data" -e "statistics" -e $1 -u)
|
||||
printf "$1=$value\n"
|
||||
}
|
||||
|
||||
#
|
||||
generateSpecificReport()
|
||||
{
|
||||
|
@ -116,17 +108,17 @@ generateSpecificReport()
|
|||
echo "Nombre d'ipv6 utilisatrices du service = $ipv6UserCount"
|
||||
|
||||
echo "Nombre total d'ip utilisatrices du service = $((ipv4UserCount+ipv6UserCount))"
|
||||
echo "Nombre total d'erreurs = $errorsCount"
|
||||
echo "Nombre total d'erreurs = $errorsCount"
|
||||
echo "Nombre d'évènements = $(echo "$json" | jshon -e "data" -e "statistics" -e "numberOfEvents" -u)"
|
||||
echo "Nombre d'évènements locaux = $(echo "$json" | jshon -e "data" -e "statistics" -e "numberOfLocalEvents" -u)"
|
||||
echo "Nombre de groupes = $(echo "$json" | jshon -e "data" -e "statistics" -e "numberOfGroups" -u)"
|
||||
echo "Nombre de groupes locaux = $(echo "$json" | jshon -e "data" -e "statistics" -e "numberOfLocalGroups" -u)"
|
||||
echo "Nombre de commentaires = $(echo "$json" | jshon -e "data" -e "statistics" -e "numberOfComments" -u)"
|
||||
echo "Nombre de commentaires locaux = $(echo "$json" | jshon -e "data" -e "statistics" -e "numberOfLocalComments" -u)"
|
||||
echo "Nombre d'instances abonnées = $(echo "$json" | jshon -e "data" -e "statistics" -e "numberOfInstanceFollowers" -u)"
|
||||
echo "Nombre d'instances suivies = $(echo "$json" | jshon -e "data" -e "statistics" -e "numberOfInstanceFollowings" -u)"
|
||||
echo "Nombre d'utilisateurices selon l'api = $(echo "$json" | jshon -e "data" -e "statistics" -e "numberOfUsers" -u)"
|
||||
|
||||
show "numberOfEvents"
|
||||
show "numberOfLocalEvents"
|
||||
show "numberOfGroups"
|
||||
show "numberOfLocalGroups"
|
||||
show "numberOfComments"
|
||||
show "numberOfLocalComments"
|
||||
show "numberOfInstanceFollowers"
|
||||
show "numberOfInstanceFollowings"
|
||||
show "numberOfUsers"
|
||||
echo
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user