ifs fix
This commit is contained in:
@@ -28,12 +28,10 @@ function get_vars_from_csv {
|
||||
f_last_4_price=$(echo ${f_last_4_prices} | head -n1)
|
||||
f_last_4_prices_change=$(g_percentage-diff ${f_last_4_price} ${f_price})
|
||||
|
||||
local f_orig_ifs=${IFS}
|
||||
IFS=\n
|
||||
if echo ${f_last_4_prices} | sort -n -C
|
||||
if printf '%s\n' ${f_last_4_prices} | sort -n -C
|
||||
then
|
||||
f_price_trend="constantly growing,${f_last_4_prices_change}"
|
||||
elif echo ${f_last_4_prices} | sort -n -r -C
|
||||
elif printf '%s\n' ${f_last_4_prices} | sort -n -r -C
|
||||
then
|
||||
f_price_trend="constantly falling,${f_last_4_prices_change}"
|
||||
elif g_num_is_higher ${f_last_4_prices_change} 0
|
||||
@@ -47,7 +45,6 @@ function get_vars_from_csv {
|
||||
fi
|
||||
f_all_vars="$f_all_vars
|
||||
f_price_trend=${f_price_trend}"
|
||||
IFS=${f_orig_ifs}
|
||||
|
||||
# MACD EMA
|
||||
get_var_from_line ema12 4
|
||||
|
||||
Reference in New Issue
Block a user