get price from raw file if non-full-loop
This commit is contained in:
parent
17dd8a0f1d
commit
2a7ec12fff
@ -39,6 +39,15 @@ function get_vars_from_csv {
|
|||||||
# basics
|
# basics
|
||||||
get_var_from_line date 1
|
get_var_from_line date 1
|
||||||
get_var_from_line price 2
|
get_var_from_line price 2
|
||||||
|
|
||||||
|
# get newest price from raw file if this is a non-full loop
|
||||||
|
# TODO: Nicer pure-bash code
|
||||||
|
if [ ${FULL_LOOP} == 0 ]
|
||||||
|
then
|
||||||
|
f_ASSET_HIST_FILE_RAW=$(echo ${f_ASSET_HIST_FILE} | sed 's/.csv$/-raw.csv/')
|
||||||
|
f_price=$(tail -n1 "${f_ASSET_HIST_FILE_RAW}" | cut -d, -f2)
|
||||||
|
fi
|
||||||
|
|
||||||
get_var_from_line price_change 3
|
get_var_from_line price_change 3
|
||||||
|
|
||||||
# Check for price trend last 4 iterations
|
# Check for price trend last 4 iterations
|
||||||
|
Loading…
Reference in New Issue
Block a user