exponential numbers to normal
This commit is contained in:
parent
2569ab41be
commit
3b0f1f8e3a
@ -143,7 +143,8 @@ function get_var_from_line {
|
||||
f_empty_var=1
|
||||
fi
|
||||
else
|
||||
#declare -g f_$1="$(echo ${f_last_line_array[$2]})"
|
||||
# next line for exponential numbers (e.g. 7.86890874600464e05) to "normal" - coming sometimes from coingecko
|
||||
[[ ${f_last_line_array[$2]} =~ ^(-)?(\.)?[0-9]+(\.)?([0-9]+)?(e-[0-9]+)?$ ]] && printf -v f_last_line_array[$2] -- "%.10f" "${f_last_line_array[$2]}"
|
||||
declare -g f_$1="${f_last_line_array[$2]}"
|
||||
fi
|
||||
f_all_vars="$f_all_vars
|
||||
|
Loading…
Reference in New Issue
Block a user