From 540ad83ef8ca6c3785aaf4467465b5e5fd6687fd Mon Sep 17 00:00:00 2001 From: Jeroen De Meerleer Date: Fri, 2 Jun 2023 13:51:38 +0200 Subject: [PATCH] Improve check-webcron.sh output formatting The code changes add a printf statement to format the output of the check-webcron.sh script. The new format rounds the value to three decimal places, improving readability. --- check-webcron.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/check-webcron.sh b/check-webcron.sh index 2f099ce..14ba2ef 100644 --- a/check-webcron.sh +++ b/check-webcron.sh @@ -102,8 +102,7 @@ jobsdue=$(echo $health | jq '.JobsDue') jobsrunning=$(echo $health | jq '.JobsRunning') jobsfailing=$(echo $health | jq '.JobsFailing') -val=$(echo "$jobsfailing/$jobstotal" | bc -l) - +val=$(printf %.3f $(echo "$jobsfailing/$jobstotal" | bc -l)) rdetail="" if (( $(echo "$RESPONSE_CODE != 200" | bc -l) )); then rval=2