From a104f2e7a91fc2b156292305dc0fa7dcd7201e2a Mon Sep 17 00:00:00 2001 From: z4yx Date: Mon, 27 Apr 2020 16:46:06 +0800 Subject: [PATCH] bc not required --- ELK.sh | 1 - helpers/size-sum.sh | 3 ++- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ELK.sh b/ELK.sh index 35eea6a..7ac0ff4 100755 --- a/ELK.sh +++ b/ELK.sh @@ -13,7 +13,6 @@ YUM_PATH="${BASE_PATH}/yum" APT_PATH="${BASE_PATH}/apt" export REPO_SIZE_FILE=/tmp/reposize.$RANDOM -echo -n 0 >$REPO_SIZE_FILE declare -A REPO_VERSIONS=( ["elasticsearch"]="2.x" diff --git a/helpers/size-sum.sh b/helpers/size-sum.sh index f743a57..1fef087 100755 --- a/helpers/size-sum.sh +++ b/helpers/size-sum.sh @@ -1,4 +1,5 @@ #!/bin/bash +# requires: coreutils sz=$(cat $1) -sz=$(echo $sz | bc) +sz=$(($sz)) echo "size-sum:" $(numfmt --to=iec $sz)