From dfe6cf3e08c9bb8ee62f00ff8a31b1b0d9474d70 Mon Sep 17 00:00:00 2001 From: mag37 Date: Sun, 28 Jan 2024 20:08:17 +0100 Subject: [PATCH] arithmetic formatting --- dockcheck.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dockcheck.sh b/dockcheck.sh index 47b6bdb..aca5a51 100755 --- a/dockcheck.sh +++ b/dockcheck.sh @@ -124,7 +124,7 @@ choosecontainers() { datecheck() { ImageDate=$($regbin image inspect "$RepoUrl" --format='{{.Created}}' | cut -d" " -f1 ) - ImageAge=$((($(date +%s) - $(date -d "$ImageDate" +%s))/86400)) + ImageAge=$(( ( $(date +%s) - $(date -d "$ImageDate" +%s) )/86400 )) if [ $ImageAge -gt $DaysOld ] ; then return 0 else