gaboshlib/g_calc.sh aktualisiert
This commit is contained in:
parent
13e66130f5
commit
44b71f5f3b
@ -25,12 +25,19 @@ function g_calc {
|
||||
# do bc
|
||||
echo "scale=8; $@" >&3
|
||||
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
|
||||
echo ${g_bc_out} >&5
|
||||
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 ${g_sed_out}
|
||||
|
Loading…
Reference in New Issue
Block a user