From 3c559e65c6aafd365b586d932386e896bd62e707 Mon Sep 17 00:00:00 2001 From: olli Date: Sun, 12 Nov 2023 12:41:31 +0100 Subject: [PATCH] more pure bash to speed up things --- dabo/functions/get_vars_from_csv.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/dabo/functions/get_vars_from_csv.sh b/dabo/functions/get_vars_from_csv.sh index 1bd82bf..1d8c9b7 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 { - f_ASSET_HIST_FILE="$1" if ! [ -s "${f_ASSET_HIST_FILE}" ] then @@ -86,9 +85,11 @@ f_price_trend=${f_price_trend}" # MACD get_var_from_line macd_histogram 8 get_var_from_line macd_signal_relation 9 - f_macd_histogram_relation=$(echo "${f_macd_signal_relation}" | cut -d\| -f1) + #f_macd_histogram_relation=$(echo "${f_macd_signal_relation}" | cut -d\| -f1) + f_macd_histogram_relation="${f_macd_signal_relation%|*}" [ -z "$f_macd_histogram_relation" ] && return 1 - f_macd_histogram_signal=$(echo "${f_macd_signal_relation}" | cut -d\| -f2) + #f_macd_histogram_signal=$(echo "${f_macd_signal_relation}" | cut -d\| -f2) + f_macd_histogram_relation="${f_macd_signal_relation#|*}" f_all_vars="${f_all_vars} f_macd_histogram_relation=${f_macd_histogram_relation} f_macd_histogram_signal=${f_macd_histogram_signal}"