Skip to content

Commit

Permalink
dirrotate: Test using awk rather than bc
Browse files Browse the repository at this point in the history
Follows on from ec79132 in #3008.
Should resolve issue reported in #3012.
  • Loading branch information
Lestropie committed Oct 2, 2024
1 parent ca13e7f commit 996ecf4
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions testing/binaries/tests/dirrotate/default
Original file line number Diff line number Diff line change
Expand Up @@ -23,19 +23,17 @@ 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

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}'

0 comments on commit 996ecf4

Please sign in to comment.