too many arguments

This commit is contained in:
olli 2024-09-21 20:02:46 +02:00
parent c4d9e053ee
commit ed19ae5c0d

View File

@ -27,7 +27,7 @@ function g_calc {
read -u ${g_fd_bc_out} g_calc_result
# check if there is a output
if [ -z $g_calc_result ]
if [ -z "$g_calc_result" ]
then
echo "${FUNCNAME} $@" 1>&2
unset g_calc_result
@ -48,7 +48,7 @@ function g_calc {
[[ $g_calc_result == *"." ]] && g_calc_result=${g_calc_result%?}
# check output
if ! g_num_valid_number $g_calc_result
if ! g_num_valid_number "$g_calc_result"
then
echo "${FUNCNAME} $@" 1>&2
unset g_calc_result