From 77fe1e63da6eb12da04a8bbacf1637955a4f5794 Mon Sep 17 00:00:00 2001 From: olli Date: Mon, 27 Nov 2023 20:33:03 +0100 Subject: [PATCH] fix --- dabo/functions/get_vars_from_csv.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/dabo/functions/get_vars_from_csv.sh b/dabo/functions/get_vars_from_csv.sh index d1bc1ef..2b28300 100644 --- a/dabo/functions/get_vars_from_csv.sh +++ b/dabo/functions/get_vars_from_csv.sh @@ -1,5 +1,6 @@ function get_vars_from_csv { + unset f_empty_var f_ASSET_HIST_FILE="$1" if ! [ -s "${f_ASSET_HIST_FILE}" ] then @@ -125,6 +126,7 @@ f_macd_histogram_signal=${f_macd_histogram_signal}" # Coingecko price get_var_from_line coingecko_price 40 + [ -n "${f_empty_var}" ] && return 1 } @@ -133,6 +135,7 @@ function get_var_from_line { then g_echo_note "${f_ASSET_HIST_FILE}: Didn't get $1 in position $2" declare -g f_$1=0 + f_empty_var=1 else #declare -g f_$1="$(echo ${f_last_line_array[$2]})" declare -g f_$1="${f_last_line_array[$2]}"