2019-10-29 04:55:50 +01:00
|
|
|
#!/bin/bash
|
|
|
|
|
2020-06-01 02:36:19 +02:00
|
|
|
################################################################################
|
|
|
|
# Author: Poka (poka@p2p.legal)
|
|
|
|
# Version: 0.1.1
|
|
|
|
# License: AGPL-3.0 (https://choosealicense.com/licenses/agpl-3.0/)
|
|
|
|
# Git: https://git.p2p.legal/axiom-team/g1-stats
|
|
|
|
################################################################################
|
|
|
|
|
2019-11-19 16:30:48 +01:00
|
|
|
SCRIPTPATH="$( cd "$(dirname "$0")" ; pwd -P )"
|
|
|
|
if [[ -e $SCRIPTPATH/.env ]]; then source $SCRIPTPATH/.env; else echo "Veuillez créer votre fichier .env inspiré de .env.example" && exit 1; fi
|
2019-10-29 04:55:50 +01:00
|
|
|
|
2019-11-19 16:03:22 +01:00
|
|
|
### Initialisation des données ###
|
|
|
|
startTime=$(date +'%H:%M')
|
2019-12-17 00:44:01 +01:00
|
|
|
day=$(date +'%y-%m-%d')
|
2019-12-17 01:38:21 +01:00
|
|
|
dayP=$(date +'%d-%m-%y')
|
2019-11-19 16:30:48 +01:00
|
|
|
indexhtml="$WEBPATH/index.html"
|
2019-11-19 16:03:22 +01:00
|
|
|
echo -e "\n############# $day à $startTime #############\n"
|
2019-10-29 05:29:10 +01:00
|
|
|
[[ -z $(which jq) || -z $(which bc) ]] && apt update && apt install jq bc
|
2019-10-29 04:55:50 +01:00
|
|
|
echo "Initialisation ..."
|
2020-09-13 04:03:10 +02:00
|
|
|
TXBLOCKS=$(curl -s ${DUNITER}/blockchain/with/tx | jq '.result.blocks[]')
|
2019-11-08 04:16:09 +01:00
|
|
|
TXBLOCKS=($(echo "$TXBLOCKS" | sort -hu | awk '{printf $1" "}'))
|
|
|
|
unset 'TXBLOCKS[${#TXBLOCKS[@]}-1]'
|
2020-09-11 23:45:01 +02:00
|
|
|
MEMBERS=($(curl -s ${DUNITER}/wot/members | jq -r '.results[].pubkey'))
|
2019-10-29 04:55:50 +01:00
|
|
|
nbrMembers=${#MEMBERS[@]}
|
|
|
|
lastBloc=${TXBLOCKS[-1]}
|
2019-11-15 23:33:11 +01:00
|
|
|
isWeb=$1
|
2019-10-29 04:55:50 +01:00
|
|
|
|
2019-11-19 16:03:22 +01:00
|
|
|
### Extraction des adresses Ḡ1 actives ###
|
|
|
|
|
2019-11-08 04:16:09 +01:00
|
|
|
loopWalletUp() {
|
2020-09-11 23:45:01 +02:00
|
|
|
local iter=0
|
|
|
|
local REGEX_PUBKEYS="[a-zA-Z0-9]{42,44}"
|
|
|
|
|
|
|
|
if ls $SCRIPTPATH/cache/walletsUp-* > /dev/null 2>&1; then
|
|
|
|
local startFile=$(ls $SCRIPTPATH/cache/walletsUp-* | tail -n1)
|
|
|
|
local startBloc=$(echo "$startFile" | awk -F '-' '{ print $NF }')
|
|
|
|
wallets=$(cat "$startFile")$'\n'
|
|
|
|
local iter=$startBloc
|
|
|
|
rm $startFile
|
|
|
|
else
|
|
|
|
local startBloc=0
|
|
|
|
local iter=0
|
|
|
|
fi
|
|
|
|
|
|
|
|
for i in ${TXBLOCKS[*]:$startBloc}; do # pour tout n° de bloc listé dans TXBLOCKS
|
2020-09-13 04:03:10 +02:00
|
|
|
sleep 0.05
|
2020-09-11 23:45:01 +02:00
|
|
|
local WALLETS0=$(curl -s ${DUNITER}/blockchain/block/$i)
|
2020-09-13 04:03:10 +02:00
|
|
|
until WALLETS=$(echo $WALLETS0 | jq -r '.transactions[].outputs[]' 2>/dev/null | grep "SIG" | grep -Eo $REGEX_PUBKEYS); do
|
|
|
|
[[ $isWeb != "web" ]] && echo -e "iter $iter \n$WALLETS0"
|
2019-11-15 23:33:11 +01:00
|
|
|
sleep 2
|
2020-09-11 23:45:01 +02:00
|
|
|
WALLETS0=$(curl -s ${DUNITER}/blockchain/block/$i)
|
2019-11-15 23:33:11 +01:00
|
|
|
done
|
|
|
|
|
2020-09-13 04:03:10 +02:00
|
|
|
[[ -z "$WALLETS" ]] && echo "$WALLETS est vide, on zap..." && continue
|
2019-11-08 04:16:09 +01:00
|
|
|
wallets+=$(echo -e "$WALLETS \n" | sed 's/ /\\n/g')
|
2019-10-29 04:55:50 +01:00
|
|
|
|
2020-09-11 23:45:01 +02:00
|
|
|
local progress=$(echo "scale=1; $i*100/$lastBloc/1" | bc)
|
2019-11-15 23:33:11 +01:00
|
|
|
if [[ $isWeb != "web" ]]; then
|
2019-11-08 04:16:09 +01:00
|
|
|
clear
|
|
|
|
echo "Heure de début: $startTime"
|
|
|
|
echo
|
2020-09-11 23:45:01 +02:00
|
|
|
echo "Scan en cours: $progress% - $i/$lastBloc"
|
2019-11-08 04:16:09 +01:00
|
|
|
fi
|
2019-10-29 04:55:50 +01:00
|
|
|
|
2019-11-08 04:16:09 +01:00
|
|
|
((iter++))
|
2020-09-13 01:01:22 +02:00
|
|
|
|
|
|
|
## [[ $iter -ge 25 ]] && break #kopa
|
2019-11-08 04:16:09 +01:00
|
|
|
done
|
2020-09-11 23:45:01 +02:00
|
|
|
|
|
|
|
# On supprime les doublons et les lignes vides
|
|
|
|
wallets=$(echo -e "$wallets" | sort -u | awk 'NF')
|
|
|
|
# On écrit les pubkeys avec transaction dans un fichier de cache pour la prochaine itération
|
|
|
|
((iter--))
|
|
|
|
[[ ! -d $SCRIPTPATH/cache ]] && mkdir $SCRIPTPATH/cache
|
|
|
|
echo "$wallets" > $SCRIPTPATH/cache/walletsUp-$iter
|
2019-11-08 04:16:09 +01:00
|
|
|
}
|
|
|
|
loopWalletUp
|
2019-11-19 16:03:22 +01:00
|
|
|
|
|
|
|
### Ajout des membres sans transaction au fichier tampon ###
|
2019-11-08 04:16:09 +01:00
|
|
|
loopMembers() {
|
2020-09-11 23:45:01 +02:00
|
|
|
local iter=0
|
2019-10-29 04:55:50 +01:00
|
|
|
for i in ${MEMBERS[*]}; do
|
2020-09-11 23:45:01 +02:00
|
|
|
local progress=$(echo "scale=0; $iter*100/$nbrMembers/1" | bc)
|
2019-10-29 04:55:50 +01:00
|
|
|
if [[ $progress =~ ^(0|10|20|30|40|50|60|70|80|90|99)$ ]]; then
|
|
|
|
[[ $progress == 99 ]] && progress=100
|
2019-11-15 23:33:11 +01:00
|
|
|
if [[ $isWeb != "web" ]]; then
|
2019-10-30 14:02:43 +01:00
|
|
|
clear
|
|
|
|
echo "Heure de début: $startTime"
|
|
|
|
echo
|
2020-09-11 23:45:01 +02:00
|
|
|
echo "Scan en cours: 100% - $lastBloc/$lastBloc"
|
2019-10-30 14:02:43 +01:00
|
|
|
echo "Ajouts des comptes membres ... $progress%"
|
|
|
|
fi
|
2019-10-29 04:55:50 +01:00
|
|
|
fi
|
|
|
|
|
2020-09-11 23:45:01 +02:00
|
|
|
if [[ -z $(echo "$wallets" | grep "$i") ]]; then
|
|
|
|
wallets+=$'\n'"$i"
|
2019-10-29 04:55:50 +01:00
|
|
|
fi
|
|
|
|
|
|
|
|
((iter++))
|
|
|
|
done
|
2019-11-08 04:16:09 +01:00
|
|
|
}
|
|
|
|
loopMembers
|
|
|
|
|
2019-11-19 16:03:22 +01:00
|
|
|
### Calcul du nombre de wallets ###
|
2020-09-11 23:45:01 +02:00
|
|
|
nbrTotalWallets=$(echo "$wallets" | wc -l)
|
2019-10-29 04:55:50 +01:00
|
|
|
nbrSimpleWallets=$(echo "$nbrTotalWallets-$nbrMembers" | bc)
|
|
|
|
pourcentMbrs=$(echo "scale=1; $nbrMembers*100/$nbrTotalWallets/1" | bc)
|
|
|
|
pourcentWallets=$(echo "scale=1; $nbrSimpleWallets*100/$nbrTotalWallets/1" | bc)
|
|
|
|
|
2019-11-19 16:03:22 +01:00
|
|
|
### Renseignement de l'index web et indexation de l'historique ###
|
2019-10-29 05:18:10 +01:00
|
|
|
web() {
|
2019-11-19 16:03:22 +01:00
|
|
|
|
2019-11-19 16:30:48 +01:00
|
|
|
[ ! -d $WEBPATH/history/ ] && mkdir -p $WEBPATH/history/
|
2020-06-18 20:34:33 +02:00
|
|
|
[ ! -d $WEBPATH/graph/ ] && mkdir -p $WEBPATH/graph/
|
2020-06-20 22:48:35 +02:00
|
|
|
[ ! -d $WEBPATH/css ] && cp -r $SCRIPTPATH/tpl/css $WEBPATH/
|
|
|
|
[ ! -d $WEBPATH/js ] && cp -r $SCRIPTPATH/tpl/js $WEBPATH/
|
2020-06-18 03:28:09 +02:00
|
|
|
cp $SCRIPTPATH/tpl/index.html $indexhtml
|
2019-11-19 16:03:22 +01:00
|
|
|
|
2020-09-11 23:45:01 +02:00
|
|
|
local datePrevious=$(date +'%y-%m-%d' -d "$day -1 day")
|
2019-11-19 16:30:48 +01:00
|
|
|
[[ -z $(ls -l $WEBPATH/history/ | grep $datePrevious) && -z $(grep '"display:none;" class="previous"' $indexhtml) ]] && sed -i "s/class=\"previous\"/style=\"display:none;\" class=\"previous\"/g" $indexhtml
|
2020-09-11 23:45:01 +02:00
|
|
|
local dateNext=$(date +'%y-%m-%d' -d "$day +1 day")
|
2019-11-19 16:30:48 +01:00
|
|
|
[[ -z $(ls -l $WEBPATH/history/ | grep $dateNext) && -z $(grep '"display:none;" class="next"' $indexhtml) ]] && sed -i "s/class=\"next\"/style=\"display:none;\" class=\"next\"/g" $indexhtml
|
2019-11-19 16:03:22 +01:00
|
|
|
|
2019-10-29 05:18:10 +01:00
|
|
|
sed -i "s/_nbrTotalWallets/$nbrTotalWallets/g" $indexhtml
|
|
|
|
sed -i "s/_nbrSimpleWallets/$nbrSimpleWallets/g" $indexhtml
|
2019-10-30 14:02:43 +01:00
|
|
|
sed -i "s/_nbrMembers/$nbrMembers/g" $indexhtml
|
2019-10-29 05:18:10 +01:00
|
|
|
sed -i "s/_pourcentMbrs/$pourcentMbrs/g" $indexhtml
|
2019-10-30 14:02:43 +01:00
|
|
|
sed -i "s/_pourcentWallets/$pourcentWallets/g" $indexhtml
|
2019-11-19 16:03:22 +01:00
|
|
|
# sed -i "s/_node/$DUNITER/g" $indexhtml
|
2019-11-08 06:48:13 +01:00
|
|
|
sed -i "s/_heure/$startTime/g" $indexhtml
|
2020-09-11 23:45:01 +02:00
|
|
|
sed -i "s/_day/$dayP/g" $indexhtml
|
2019-11-08 04:16:09 +01:00
|
|
|
sed -i "s/_txInSimple/$txInSimple/g" $indexhtml
|
|
|
|
sed -i "s/_txOutSimple/$txOutSimple/g" $indexhtml
|
|
|
|
sed -i "s/_soldeSimple/$soldeSimple/g" $indexhtml
|
2020-09-11 23:45:01 +02:00
|
|
|
sed -i "s/_txInMembers/$txInMembers/g" $indexhtml
|
|
|
|
sed -i "s/_txOutMembers/$txOutMembers/g" $indexhtml
|
|
|
|
sed -i "s/_soldeMembers/$soldeMembers/g" $indexhtml
|
2019-11-15 23:33:11 +01:00
|
|
|
sed -i "s/_pourcentSimpleWallet/$pourcentSimpleWallet/g" $indexhtml
|
2019-11-08 04:16:09 +01:00
|
|
|
sed -i "s/_nonConsumedUDT/$nonConsumedUDT/g" $indexhtml
|
2020-09-11 23:45:01 +02:00
|
|
|
sed -i "s/_monetaryMass/$monetaryMass/g" $indexhtml
|
2020-06-01 02:36:19 +02:00
|
|
|
sed -i "s/_sleepyG1/$sleepyG1/g" $indexhtml
|
2020-09-11 23:45:01 +02:00
|
|
|
[[ -z $(grep '"display:none;" class="previous"' $indexhtml) ]] && sed -i "s/_datePrevious/$datePrevious/g" $indexhtml && setPrevious="Oui"
|
|
|
|
[[ -z $(grep '"display:none;" class="next"' $indexhtml) ]] && sed -i "s/_dateNext/$dateNext/g" $indexhtml && setNext="Oui"
|
2019-11-15 23:33:11 +01:00
|
|
|
|
2020-09-11 23:45:01 +02:00
|
|
|
echo "$wallets" | grep . > $WEBPATH/wallets-g1.txt
|
2019-11-19 16:30:48 +01:00
|
|
|
echo -e "${MEMBERS[@]}" | sed 's/ /\n/g' > $WEBPATH/wallets-g1-membres.txt
|
|
|
|
echo -e "$simpleWallets" > $WEBPATH/wallets-g1-simple.txt
|
2019-11-15 23:33:11 +01:00
|
|
|
|
|
|
|
if [[ "$startTime" == "00:00" ]]; then
|
2019-11-19 16:30:48 +01:00
|
|
|
cp $indexhtml $WEBPATH/history/index_$day.html
|
|
|
|
sed -i "s/css\/style.css/..\/css\/style.css/g" $WEBPATH/history/index_$day.html
|
2020-06-25 00:56:12 +02:00
|
|
|
sed -i "s/logo-axiom-team.svg/..\/logo-axiom-team.svg/g" $WEBPATH/history/index_$day.html
|
2019-11-19 16:30:48 +01:00
|
|
|
sed -i "s/_dateNext/$day/g" $WEBPATH/history/index_$datePrevious.html
|
|
|
|
sed -i "s/style=\"display:none;\" class=\"next\"/class=\"next\"/g" $WEBPATH/history/index_$datePrevious.html
|
2019-11-15 23:33:11 +01:00
|
|
|
fi
|
2020-06-18 03:49:13 +02:00
|
|
|
|
|
|
|
# Export JSON for graph
|
|
|
|
$SCRIPTPATH/transform_json.sh
|
|
|
|
|
|
|
|
# chown www-data for nginx needs
|
2019-11-19 16:30:48 +01:00
|
|
|
chown -R www-data:www-data $WEBPATH
|
2019-10-29 05:18:10 +01:00
|
|
|
}
|
|
|
|
|
2019-11-19 16:03:22 +01:00
|
|
|
### Affichage du nombre de wallets ###
|
2019-11-08 04:16:09 +01:00
|
|
|
echo -e "\n ---\n"
|
2019-10-30 14:02:43 +01:00
|
|
|
echo "Noeud: $DUNITER"
|
2020-09-13 04:03:10 +02:00
|
|
|
echo "Nombre total de wallet: $nbrTotalWallets"
|
|
|
|
echo "Nombre de membres: $nbrMembers (${pourcentMbrs}%)"
|
|
|
|
echo "Nombre de simple portefeuille: $nbrSimpleWallets (${pourcentWallets}%)"
|
2019-11-08 04:16:09 +01:00
|
|
|
echo -e "\n ---\n"
|
|
|
|
echo "Extraction wallets membres / Simples portefeuille"
|
2019-11-19 16:03:22 +01:00
|
|
|
echo -e "\n ---\n"
|
2019-11-08 04:16:09 +01:00
|
|
|
|
2019-11-19 16:03:22 +01:00
|
|
|
### Isolation des simples portefeuilles ###
|
2020-09-11 23:45:01 +02:00
|
|
|
simpleWallets="$wallets"
|
2019-11-08 04:16:09 +01:00
|
|
|
echo "Isolation des simples portefeuilles..."
|
|
|
|
for i in ${MEMBERS[@]}; do
|
|
|
|
simpleWallets=$(echo "$simpleWallets" | grep -v "$i")
|
|
|
|
done
|
|
|
|
|
2019-11-19 16:03:22 +01:00
|
|
|
### Boucle d'obtention des soldes ###
|
2019-11-08 04:16:09 +01:00
|
|
|
getSolde(){
|
2020-09-11 23:45:01 +02:00
|
|
|
solde=0
|
|
|
|
txInT=0
|
|
|
|
txOutT=0
|
|
|
|
nonConsumedUDT=0
|
|
|
|
nonConsumedUD=0
|
|
|
|
for i in $pubkeys; do
|
|
|
|
until txInL=$(curl -s "$ESNODE/g1/movement/_search?filter_path=hits.hits._source&size=10000&q=recipient:$i&pretty"); do
|
|
|
|
echo "Erreur: $i"
|
|
|
|
sleep 1
|
|
|
|
done
|
|
|
|
until txOutL=$(curl -s "$ESNODE/g1/movement/_search?filter_path=hits.hits._source&size=10000&q=issuer:$i&pretty"); do
|
|
|
|
echo "Erreur: $i"
|
|
|
|
sleep 1
|
|
|
|
done
|
2019-11-08 04:16:09 +01:00
|
|
|
|
2020-09-11 23:45:01 +02:00
|
|
|
if [[ $1 == "mbr" ]]; then
|
|
|
|
nonConsumedUD=$(curl -s ${DUNITER}/ud/history/$i | jq '.history.history[].amount' | awk '{s+=$1} END {print s}') || nonConsumedUD=0
|
|
|
|
[[ -z $nonConsumedUD ]] && nonConsumedUD=0
|
|
|
|
nonConsumedUDT=$(echo -e "scale=2; ($nonConsumedUD/100)+$nonConsumedUDT" | bc)
|
|
|
|
fi
|
2019-11-08 04:16:09 +01:00
|
|
|
|
2020-09-11 23:45:01 +02:00
|
|
|
[[ $txInL != "{ }" ]] && txIn=$(echo "$txInL" | jq '.hits.hits[]._source.amount' | awk '{s+=$1} END {print s}') || txIn=0
|
|
|
|
[[ $txOutL != "{ }" ]] && txOut=$(echo "$txOutL" | jq '.hits.hits[]._source.amount' | awk '{s+=$1} END {print s}') || txOut=0
|
2019-11-08 04:16:09 +01:00
|
|
|
|
2020-09-11 23:45:01 +02:00
|
|
|
solde=$(echo -e "scale=2; (($txIn-$txOut+$nonConsumedUD)/100)+$solde" | bc)
|
2019-11-08 04:16:09 +01:00
|
|
|
|
2020-09-11 23:45:01 +02:00
|
|
|
txInT=$(echo -e "scale=2; (($txIn+$nonConsumedUD)/100)+$txInT" | bc)
|
|
|
|
txOutT=$(echo -e "scale=2; ($txOut/100)+$txOutT" | bc)
|
2019-11-08 04:16:09 +01:00
|
|
|
|
2020-09-11 23:45:01 +02:00
|
|
|
done
|
2019-11-08 04:16:09 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
echo "Récupération du solde des simples wallets..."
|
|
|
|
|
|
|
|
pubkeys=$simpleWallets
|
|
|
|
getSolde
|
2019-11-15 23:33:11 +01:00
|
|
|
txInSimple=$(echo $txInT | tr . , | sed ':a;s/\B[0-9]\{3\}\>/.&/;ta')
|
|
|
|
txOutSimple=$(echo $txOutT | tr . , | sed ':a;s/\B[0-9]\{3\}\>/.&/;ta')
|
|
|
|
soldeSimpleBrut=$(echo $solde)
|
|
|
|
soldeSimple=$(echo $soldeSimpleBrut | tr . , | sed ':a;s/\B[0-9]\{3\}\>/.&/;ta')
|
2019-11-08 04:16:09 +01:00
|
|
|
echo -e "Reçus simples wallets:\t $txInSimple"
|
|
|
|
echo -e "Envoyé simples wallets:\t $txOutSimple"
|
|
|
|
echo -e "Soldes simples wallets:\t $soldeSimple"
|
|
|
|
echo -e "\n ---\n"
|
|
|
|
echo "Récupération du solde des membres..."
|
|
|
|
|
|
|
|
pubkeys=${MEMBERS[@]}
|
2019-11-08 06:48:13 +01:00
|
|
|
getSolde
|
2019-11-15 23:33:11 +01:00
|
|
|
txInMembers=$(echo $txInT | tr . , | sed ':a;s/\B[0-9]\{3\}\>/.&/;ta')
|
|
|
|
txOutMembers=$(echo $txOutT | tr . , | sed ':a;s/\B[0-9]\{3\}\>/.&/;ta')
|
|
|
|
soldeMembersBrut=$(echo $solde)
|
|
|
|
soldeMembers=$(echo $soldeMembersBrut | tr . , | sed ':a;s/\B[0-9]\{3\}\>/.&/;ta')
|
2019-11-08 04:16:09 +01:00
|
|
|
echo -e "Reçus membres:\t $txInMembers"
|
|
|
|
echo -e "Envoyé membres:\t $txOutMembers"
|
|
|
|
echo -e "Soldes membres:\t $soldeMembers"
|
|
|
|
echo -e "Total DU non consumés:\t $nonConsumedUDT"
|
|
|
|
|
2019-11-19 16:03:22 +01:00
|
|
|
### Calcul de la masse monétaire et du pourcentage de Ḡ1 sur les simples portefeuilles ###
|
2019-11-08 06:48:13 +01:00
|
|
|
monetaryMass=$(curl -s ${DUNITER}/blockchain/current | jq .monetaryMass)
|
2019-11-15 23:33:11 +01:00
|
|
|
monetaryMassBrut=$(echo -e "scale=2; ($monetaryMass/100)/1" | bc)
|
|
|
|
monetaryMass=$(echo "$monetaryMassBrut" | tr . , | sed ':a;s/\B[0-9]\{3\}\>/.&/;ta')
|
|
|
|
soldeWalletMembers=$(echo "scale=2; $soldeMembersBrut+$soldeSimpleBrut" | bc | tr . , | sed ':a;s/\B[0-9]\{3\}\>/.&/;ta')
|
|
|
|
pourcentSimpleWallet=$(echo "scale=1; $soldeSimpleBrut*100/$monetaryMassBrut/1" | bc)
|
2019-11-08 04:16:09 +01:00
|
|
|
|
|
|
|
echo -e "\n ---\n"
|
2019-11-08 06:48:13 +01:00
|
|
|
echo -e "Solde des membres (sans DU):\t $soldeWalletMembers"
|
|
|
|
echo -e "Masse Monétaire:\t $monetaryMass Ḡ1"
|
2019-11-08 04:16:09 +01:00
|
|
|
|
2020-06-01 02:36:19 +02:00
|
|
|
|
|
|
|
# Analyse
|
|
|
|
echo -e "\n ---\n Analyse\n ---\n"
|
|
|
|
sleepyG1=$(echo -e "scale=1; 100-$txOutT*100/$monetaryMassBrut" | bc | tr . ,)
|
|
|
|
echo -e "$sleepyG1% des Ḡ1 n'ont jamais été utilisés."
|
|
|
|
|
2019-11-15 23:33:11 +01:00
|
|
|
[[ $isWeb == "web" ]] && web
|
2019-10-29 04:55:50 +01:00
|
|
|
|
2019-11-19 16:03:22 +01:00
|
|
|
### Fin de programme ###
|
2019-11-15 23:33:11 +01:00
|
|
|
day=$(date +'%d-%m-%y')
|
|
|
|
echo "$day - Heure de fin: $(date +'%H:%M')"
|