From 8584f2841334fec1eb1f9d3f0cab257c094dfb1f Mon Sep 17 00:00:00 2001 From: Mason Rowe Date: Thu, 30 Nov 2023 01:09:32 -0500 Subject: [PATCH] Replace bc commands (#79) --- yabs.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/yabs.sh b/yabs.sh index 5b35dd3..258400a 100644 --- a/yabs.sh +++ b/yabs.sh @@ -533,14 +533,14 @@ elif [ -z "$SKIP_FIO" ]; then free_space=$(df -Th | grep -w $long | grep -i zfs | awk '{print $5}' | head -c -2) if [[ $size_b == 'T' ]]; then - free_space=$(bc <<< "$free_space*1024") + free_space=$((free_space * 1024)) size_b='G' fi if [[ $(df -Th | grep -w $long) == *"zfs"* ]];then if [[ $size_b == 'G' ]]; then - if [[ $(echo "$free_space < $mul_spa" | bc) -ne 0 ]];then + if ((free_space < mul_spa)); then warning=1 fi else