From 84b6f8b5e4a9d43fb9f2e53a71be20fc3f7b9cd1 Mon Sep 17 00:00:00 2001 From: olli Date: Sun, 12 Nov 2023 17:25:28 +0100 Subject: [PATCH] more pure bash to speed up things --- dabo/analyze.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dabo/analyze.sh b/dabo/analyze.sh index 21fdb2c..66b9975 100755 --- a/dabo/analyze.sh +++ b/dabo/analyze.sh @@ -74,12 +74,12 @@ function analyze { f_buy_score="" time=$(echo $line | cut -d, -f1 | cut -d: -f1,2) - f_market_performance_before=${f_market_performance} #f_market_performance=$(grep "^$time" data/botdata/MARKET_PERFORMANCE | tail -n1 | cut -d: -f4 | cut -d"%" -f1 | sed 's/ *//') time=${time//[^0-9]/} f_market_performance=${f_market_performace_array[${time}]} - echo "MARKET_PERF=$f_market_performance" [ -z "${f_market_performance}" ] && f_market_performance=${f_market_performance_before} + f_market_performance_before=${f_market_performance} + echo "MARKET_PERF=$f_market_performance" echo "$line" >>${g_tmp}/${tmpfile} #echo " ${line},${f_market_performance}" | perl -pe 's/([0-9].[0-9][0-9][0-9][0-9][0-9][0-9])[0-9]+/$1/g' | column -t -s, >>${g_tmp}/output-${tmpfile}