more pure bash to speed up things
This commit is contained in:
parent
9b21a48fa8
commit
4871759160
@ -9,7 +9,7 @@ function get_vars_from_csv {
|
|||||||
|
|
||||||
if [ -z "${f_last_lines}" ]
|
if [ -z "${f_last_lines}" ]
|
||||||
then
|
then
|
||||||
mapfile -t f_last_lines <<< $(tail -n4 "${f_ASSET_HIST_FILE}")
|
# mapfile -t f_last_lines <<< $(tail -n4 "${f_ASSET_HIST_FILE}")
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -z "${f_market_performance}" ]
|
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
|
if g_num_is_higher ${f_last_4_prices_change} 0
|
||||||
then
|
then
|
||||||
f_price_trend="growing,${f_last_4_prices_change}"
|
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]}
|
#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
|
#then
|
||||||
f_price_trend="constantly growing,${f_last_4_prices_change}"
|
# f_price_trend="constantly growing,${f_last_4_prices_change}"
|
||||||
fi
|
#fi
|
||||||
elif g_num_is_lower ${f_last_4_prices_change} 0
|
elif g_num_is_lower ${f_last_4_prices_change} 0
|
||||||
then
|
then
|
||||||
f_price_trend="falling,${f_last_4_prices_change}"
|
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]}
|
#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
|
#then
|
||||||
f_price_trend="constantly falling,${f_last_4_prices_change}"
|
# f_price_trend="constantly falling,${f_last_4_prices_change}"
|
||||||
fi
|
#fi
|
||||||
else
|
else
|
||||||
f_price_trend="constant,${f_last_4_prices_change}"
|
f_price_trend="constant,${f_last_4_prices_change}"
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user