more pure bash to speed up things
This commit is contained in:
parent
631081e209
commit
861e2b9402
@ -12,6 +12,8 @@ function get_vars_from_csv {
|
|||||||
mapfile -t f_last_lines <<< $(tail -n4 "${f_ASSET_HIST_FILE}")
|
mapfile -t f_last_lines <<< $(tail -n4 "${f_ASSET_HIST_FILE}")
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
set -x
|
||||||
|
|
||||||
if [ -z "${f_market_performance}" ]
|
if [ -z "${f_market_performance}" ]
|
||||||
then
|
then
|
||||||
f_market_performance="-50"
|
f_market_performance="-50"
|
||||||
@ -20,12 +22,13 @@ function get_vars_from_csv {
|
|||||||
|
|
||||||
#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[3]}"
|
f_last_line="${f_last_lines[3]}"
|
||||||
echo "f_last_line: ${f_last_line}" 1>&2
|
|
||||||
readarray -d "," -t f_last_line_array < <(echo "0,${f_last_line}")
|
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[2]}")
|
readarray -d "," -t f_2_last_line_array < <(echo "0,${f_last_lines[2]}")
|
||||||
readarray -d "," -t f_3_last_line_array < <(echo "0,${f_last_lines[1]}")
|
readarray -d "," -t f_3_last_line_array < <(echo "0,${f_last_lines[1]}")
|
||||||
readarray -d "," -t f_4_last_line_array < <(echo "0,${f_last_lines[0]}")
|
readarray -d "," -t f_4_last_line_array < <(echo "0,${f_last_lines[0]}")
|
||||||
|
|
||||||
|
set +x
|
||||||
|
|
||||||
f_asset=$(basename ${f_ASSET_HIST_FILE} | cut -d\. -f1)
|
f_asset=$(basename ${f_ASSET_HIST_FILE} | cut -d\. -f1)
|
||||||
|
|
||||||
# basics
|
# basics
|
||||||
|
Loading…
Reference in New Issue
Block a user