more pure bash to speed up things
This commit is contained in:
@@ -20,6 +20,8 @@ function get_vars_from_csv {
|
|||||||
mapfile -t f_last_lines_array <<< $(tail -n4 "${f_ASSET_HIST_FILE}")
|
mapfile -t f_last_lines_array <<< $(tail -n4 "${f_ASSET_HIST_FILE}")
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
set -x
|
||||||
|
|
||||||
# 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
|
||||||
|
|
||||||
@@ -31,8 +33,6 @@ function get_vars_from_csv {
|
|||||||
readarray -d "," -t f_3_last_line_array < <(echo "0,${f_last_lines_array[1]}")
|
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_4_last_line_array < <(echo "0,${f_last_lines_array[0]}")
|
||||||
|
|
||||||
set -x
|
|
||||||
|
|
||||||
# remove f_last_lines_array
|
# remove f_last_lines_array
|
||||||
unset f_last_lines_array
|
unset f_last_lines_array
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user