gaboshlib/g_calc.sh aktualisiert
This commit is contained in:
parent
13e66130f5
commit
44b71f5f3b
@ -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}
|
||||||
|
Loading…
Reference in New Issue
Block a user