From be21204f2bf6288d97154b728f78c34f8cdc2f54 Mon Sep 17 00:00:00 2001 From: olli Date: Sat, 11 Nov 2023 18:05:11 +0100 Subject: [PATCH] more pure bash to speed up things --- dabo/functions/get_vars_from_csv.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dabo/functions/get_vars_from_csv.sh b/dabo/functions/get_vars_from_csv.sh index c2e74f2..472e9a1 100644 --- a/dabo/functions/get_vars_from_csv.sh +++ b/dabo/functions/get_vars_from_csv.sh @@ -1,6 +1,5 @@ function get_vars_from_csv { - set -x f_ASSET_HIST_FILE="$1" if ! [ -s "${f_ASSET_HIST_FILE}" ] @@ -15,7 +14,6 @@ function get_vars_from_csv { fi f_all_vars="f_market_performance=${f_market_performance}" - set -x # read last 4 lines in array if not given if [ -z "${f_last_lines_array}" ] then @@ -33,6 +31,8 @@ function get_vars_from_csv { readarray -d "," -t f_3_last_line_array < <(echo "0,${f_last_lines_array[1]}") readarray -d "," -t f_4_last_line_array < <(echo "0,${f_last_lines_array[0]}") + set -x + # remove f_last_lines_array unset f_last_lines_array