From 099a42d214594cc07489eb282efde2b877844a32 Mon Sep 17 00:00:00 2001 From: olli Date: Thu, 19 Dec 2024 22:50:39 +0100 Subject: [PATCH] fix: array reference --- dabo/functions/get_values.sh | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/dabo/functions/get_values.sh b/dabo/functions/get_values.sh index ed4e2bd..834a39e 100644 --- a/dabo/functions/get_values.sh +++ b/dabo/functions/get_values.sh @@ -50,6 +50,7 @@ function get_values { # get current prices from exchange get_symbols_ticker # get values from csv files + for f_asset in $f_asset_histories\ BTC${CURRENCY}\ $f_eco_assets\ @@ -111,14 +112,15 @@ function get_values { done fi done - - #unset f_first - done # use reverse as default to be 0 latest, 1 pre latest,... unset v - declare -ng v=vr + declare -Ag v + for key in "${!vr[@]}"; do + v[$key]=${vr[$key]} + done + unset vr # write values file for overview for i in "${!v[@]}"