From bfa59d2a0b5420ed75a780c4a8a16fb88f864f63 Mon Sep 17 00:00:00 2001 From: olli Date: Sat, 11 Nov 2023 17:27:22 +0100 Subject: [PATCH] more pure bash to speed up things --- dabo/functions/get_vars_from_csv.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/dabo/functions/get_vars_from_csv.sh b/dabo/functions/get_vars_from_csv.sh index d44c5fb..be6151c 100644 --- a/dabo/functions/get_vars_from_csv.sh +++ b/dabo/functions/get_vars_from_csv.sh @@ -12,6 +12,8 @@ function get_vars_from_csv { mapfile -t f_last_lines_array <<< $(tail -n4 "${f_ASSET_HIST_FILE}") fi + [ -z "${f_last_lines_array[0]}" ] && return 1 + if [ -z "${f_market_performance}" ] then f_market_performance="-50"