From cffe692e6c5ebc39d4a2deda6a8c4cd57cb09ab7 Mon Sep 17 00:00:00 2001 From: olli Date: Thu, 23 Nov 2023 10:18:50 +0100 Subject: [PATCH] more pure bash to speed up things --- dabo/functions/get_vars_from_csv.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dabo/functions/get_vars_from_csv.sh b/dabo/functions/get_vars_from_csv.sh index 8e08c52..2e55961 100644 --- a/dabo/functions/get_vars_from_csv.sh +++ b/dabo/functions/get_vars_from_csv.sh @@ -13,12 +13,13 @@ 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 - echo "open file ${f_ASSET_HIST_FILE}" mapfile -t f_last_lines_array < <(tail -n4 "${f_ASSET_HIST_FILE}") fi + set +x # if there are not four lines if [ -z "${f_last_lines_array[3]}" ]