From 4871759160d78888c5aac844118be45ef5441790 Mon Sep 17 00:00:00 2001 From: olli Date: Sat, 11 Nov 2023 16:59:52 +0100 Subject: [PATCH] more pure bash to speed up things --- dabo/functions/get_vars_from_csv.sh | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/dabo/functions/get_vars_from_csv.sh b/dabo/functions/get_vars_from_csv.sh index 7d597f4..d766063 100644 --- a/dabo/functions/get_vars_from_csv.sh +++ b/dabo/functions/get_vars_from_csv.sh @@ -9,7 +9,7 @@ function get_vars_from_csv { if [ -z "${f_last_lines}" ] then - mapfile -t f_last_lines <<< $(tail -n4 "${f_ASSET_HIST_FILE}") +# mapfile -t f_last_lines <<< $(tail -n4 "${f_ASSET_HIST_FILE}") fi if [ -z "${f_market_performance}" ] @@ -47,17 +47,17 @@ function get_vars_from_csv { if g_num_is_higher ${f_last_4_prices_change} 0 then f_price_trend="growing,${f_last_4_prices_change}" - if g_num_is_higher ${f_3_last_line_array[2]} ${f_4_last_line_array[2]} && g_num_is_higher ${f_2_last_line_array[2]} ${f_3_last_line_array[2]} && g_num_is_higher ${f_price} ${f_2_last_line_array[2]} - then - f_price_trend="constantly growing,${f_last_4_prices_change}" - fi + #if g_num_is_higher ${f_3_last_line_array[2]} ${f_4_last_line_array[2]} && g_num_is_higher ${f_2_last_line_array[2]} ${f_3_last_line_array[2]} && g_num_is_higher ${f_price} ${f_2_last_line_array[2]} + #then + # f_price_trend="constantly growing,${f_last_4_prices_change}" + #fi elif g_num_is_lower ${f_last_4_prices_change} 0 then f_price_trend="falling,${f_last_4_prices_change}" - if g_num_is_lower ${f_3_last_line_array[2]} ${f_4_last_line_array[2]} && g_num_is_lower ${f_2_last_line_array[2]} ${f_3_last_line_array[2]} && g_num_is_lower ${f_price} ${f_2_last_line_array[2]} - then - f_price_trend="constantly falling,${f_last_4_prices_change}" - fi + #if g_num_is_lower ${f_3_last_line_array[2]} ${f_4_last_line_array[2]} && g_num_is_lower ${f_2_last_line_array[2]} ${f_3_last_line_array[2]} && g_num_is_lower ${f_price} ${f_2_last_line_array[2]} + #then + # f_price_trend="constantly falling,${f_last_4_prices_change}" + #fi else f_price_trend="constant,${f_last_4_prices_change}" fi