gaboshlib/g_calc.sh aktualisiert

This commit is contained in:
olli 2023-11-07 11:03:01 +01:00
parent 13e66130f5
commit 44b71f5f3b

View File

@ -25,12 +25,19 @@ function g_calc {
# do bc # do bc
echo "scale=8; $@" >&3 echo "scale=8; $@" >&3
local g_bc_out local g_bc_out
read g_bc_out <&4 if ! read -t 0 g_bc_out <&4
then
g_traceback
return 1
fi
# do sed # do sed
echo ${g_bc_out} >&5 echo ${g_bc_out} >&5
local g_sed_out local g_sed_out
read g_sed_out <&6 if ! read -t 0 g_sed_out <&6
g_traceback
return 1
fi
# echo result # echo result
echo ${g_sed_out} echo ${g_sed_out}