From f6994e484cf115400ce1f5017ee0d97f05c32650 Mon Sep 17 00:00:00 2001 From: olli Date: Mon, 27 Nov 2023 23:04:55 +0100 Subject: [PATCH] fix empty vars --- dabo/analyze.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/dabo/analyze.sh b/dabo/analyze.sh index ef72ebd..b67d5d2 100755 --- a/dabo/analyze.sh +++ b/dabo/analyze.sh @@ -83,7 +83,10 @@ function analyze { [ -z "${f_last_lines_array[3]}" ] && continue echo "$line" >>${g_tmp}/${tmpfile} - + + # get vars + get_vars_from_csv ${g_tmp}/${tmpfile} || continue + # get time from market_performance local f_time="${f_date%:*}" f_time="${f_time//[^0-9]/}" @@ -92,12 +95,9 @@ function analyze { f_market_performance=${f_market_performace_array[${f_time}]} [ -z "${f_market_performance}" ] && f_market_performance=${f_market_performance_before} f_market_performance_before=${f_market_performance} - g_num_valid_number || unset f_market_performance + g_num_valid_number "${f_market_performance}" || f_market_performance=0 #echo "MARKET_PERF=$f_market_performance" - # get vars - get_vars_from_csv ${g_tmp}/${tmpfile} || continue - #if [ -f "${g_tmp}/open-${tmpfile}" ] if [ -n "${f_open_trade}" ] then