remove subshell

This commit is contained in:
olli 2023-11-26 16:49:58 +01:00
parent 93bb065899
commit 02be716591

View File

@ -9,5 +9,6 @@ function g_percentage-diff {
g_calc "${g_to} == 0"
[ ${g_calc_result} -eq 1 ] && return 1
g_calc "100/${g_from}*(${g_to}-${g_from})"
g_percentage_diff_result=$(printf -- "%.2f" "${g_calc_result}")
#g_percentage_diff_result=$(printf -- "%.2f" "${g_calc_result}")
printf -v g_percentage_diff_result -- "%.2f" "${g_calc_result}"
}