From 29d256a370622139ed5b9916726b0730121d12e4 Mon Sep 17 00:00:00 2001 From: kaotisk Date: Sun, 26 Dec 2021 08:25:40 +0200 Subject: Added counter --- bin/enter | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/bin/enter b/bin/enter index 8ae54fc..442d657 100755 --- a/bin/enter +++ b/bin/enter @@ -28,11 +28,12 @@ zblock="$entrance" TEMPASSIN="/tmp/aktmp_$(date -u +%s)" mkdir $TEMPASSIN cd $TEMPASSIN - +counter=0 # The loop # We break the loop from inside the loop while true do + counter=$(expr $counter + 1) # Check if $zblock exists as variable if [ ! -v $zblock ] then @@ -95,6 +96,7 @@ do elif [ "$zblock" == "$seed" ] then echo "$zblock is GENESIS block" + logthis "Counter $counter" exit 0 fi # And finally, if nothing is there exit with error -- cgit v1.2.3