Skip to content

Commit

Permalink
Using perl to generate the percent text. "bc" isn't available on True…
Browse files Browse the repository at this point in the history
…NAS SCALE. (#24)
  • Loading branch information
brandishwar authored Aug 21, 2023
1 parent 8a76414 commit b550a57
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion zfs-inplace-rebalancing.sh
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ function rebalance () {
fi

current_index="$((current_index + 1))"
progress_percent=$(echo "scale=2; ${current_index}*100/${file_count}" | bc)
progress_percent=$(perl -e "printf('%0.2f', ${current_index}*100/${file_count})")
color_echo "${Cyan}" "Progress -- Files: ${current_index}/${file_count} (${progress_percent}%)"

if [[ ! -f "${file_path}" ]]; then
Expand Down

0 comments on commit b550a57

Please sign in to comment.