„gaboshlib/g_percentage-diff.bashfunc“ ändern

This commit is contained in:
olli 2023-02-15 12:07:07 +01:00
parent 43d38ee537
commit 514a6c8224

View File

@ -3,5 +3,5 @@
function g_percentage-diff {
local g_from=$1
local g_to=$2
echo "scale=2; 100/$g_from*($g_to-$g_from)" | bc | sed 's/^\./0./; s/^-\./-0./' | xargs printf "%.2f"
echo "scale=2; 100/$g_from*($g_to-$g_from)" | bc | sed 's/^\./0./; s/^-\./-0./'
}