Skip to content

Commit

Permalink
Replace bc commands (#79)
Browse files Browse the repository at this point in the history
  • Loading branch information
masonr committed Nov 30, 2023
1 parent 52f048b commit 8584f28
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions yabs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 8584f28

Please sign in to comment.