more pure bash to speed up things

This commit is contained in:
olli 2023-11-11 18:03:26 +01:00
parent 9f3520eb27
commit 94b587e3dd

View File

@ -1,7 +1,5 @@
function get_vars_from_csv { function get_vars_from_csv {
set -x
f_ASSET_HIST_FILE="$1" f_ASSET_HIST_FILE="$1"
if ! [ -s "${f_ASSET_HIST_FILE}" ] if ! [ -s "${f_ASSET_HIST_FILE}" ]
then then
@ -24,6 +22,8 @@ function get_vars_from_csv {
# if there are not four lines # if there are not four lines
[ -z "${f_last_lines_array[3]}" ] && return 1 [ -z "${f_last_lines_array[3]}" ] && return 1
set -x
# create array of last line fields # create array of last line fields
#f_last_line="$(tail -n1 "${f_ASSET_HIST_FILE}"),${f_market_performance}" #f_last_line="$(tail -n1 "${f_ASSET_HIST_FILE}"),${f_market_performance}"
f_last_line="${f_last_lines_array[3]},${f_market_performance}" f_last_line="${f_last_lines_array[3]},${f_market_performance}"