From 0b6d521bbad2834a4c8e44b8fbfdf38fc5effd32 Mon Sep 17 00:00:00 2001 From: Robert Smith Date: Wed, 2 Oct 2024 10:00:56 +1000 Subject: [PATCH] dirrotate: Test using awk rather than bc Follows on from ec79132b92e1fbf8a72e2aa43e7f427de7e76c0e in #3008. Should resolve issue reported in #3012. --- testing/binaries/tests/dirrotate/default | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/testing/binaries/tests/dirrotate/default b/testing/binaries/tests/dirrotate/default index 9e72ed818b..31f9790f67 100644 --- a/testing/binaries/tests/dirrotate/default +++ b/testing/binaries/tests/dirrotate/default @@ -23,7 +23,6 @@ testing_diff_matrix tmp1_stats.txt tmp2_stats.txt cat tmp1.txt | \ tail -n +2 | \ tr -d "-" | \ -tr -d "n" | \ tr " " "\n" | \ sort -g -r | \ head -n1 > tmp1_max.txt @@ -31,11 +30,10 @@ head -n1 > tmp1_max.txt cat tmp2.txt | \ tail -n +2 | \ tr -d "-" | \ -tr -d "n" | \ tr " " "\n" | \ sort -g -r | \ head -n1 > tmp2_max.txt a=$(cat tmp1_max.txt) b=$(cat tmp2_max.txt) -[[ $(echo "${b} < ${a}" | bc) -eq 1 ]] +awk 'BEGIN{if ('$a'<='$b') exit 1}'