This commit is contained in:
olli 2023-11-29 18:03:21 +01:00
parent 0b80ca425b
commit 077ce2da77

View File

@ -27,11 +27,11 @@ function get_vars_from_csv {
fi
# create array of last line fields
f_last_line="${f_last_lines_array[3]},${f_market_performance}"
f_last_line="${f_last_lines_array[$((${#f_last_lines_array[@]}-1))]},${f_market_performance}"
readarray -d "," -t f_last_line_array < <(echo "0,${f_last_line}")
readarray -d "," -t f_2_last_line_array < <(echo "0,${f_last_lines_array[2]}")
readarray -d "," -t f_3_last_line_array < <(echo "0,${f_last_lines_array[1]}")
readarray -d "," -t f_4_last_line_array < <(echo "0,${f_last_lines_array[0]}")
readarray -d "," -t f_2_last_line_array < <(echo "0,${f_last_lines_array[$((${#f_last_lines_array[@]}-2))]}")
readarray -d "," -t f_3_last_line_array < <(echo "0,${f_last_lines_array[$((${#f_last_lines_array[@]}-3))]}")
readarray -d "," -t f_4_last_line_array < <(echo "0,${f_last_lines_array[$((${#f_last_lines_array[@]}-4))]}")
# bash-only basename
f_asset="${f_ASSET_HIST_FILE##*/}"