From 50d36bf2cf076aefefa9bf5d0717d35a583f9fa9 Mon Sep 17 00:00:00 2001 From: olli Date: Sun, 12 Nov 2023 17:48:49 +0100 Subject: [PATCH] more pure bash to speed up things --- dabo/analyze.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/dabo/analyze.sh b/dabo/analyze.sh index 9fb3cba..93165c7 100755 --- a/dabo/analyze.sh +++ b/dabo/analyze.sh @@ -76,7 +76,10 @@ function analyze { echo "$line" >>${g_tmp}/${tmpfile} get_vars_from_csv ${g_tmp}/${tmpfile} - echo "$f_date" + local f_time="${f_date%:*}" + f_time="${f_time//[^0-9]/}" + echo "$f_time +" time=$(echo $line | cut -d, -f1 | cut -d: -f1,2) #f_market_performance=$(grep "^$time" data/botdata/MARKET_PERFORMANCE | tail -n1 | cut -d: -f4 | cut -d"%" -f1 | sed 's/ *//') time=${time//[^0-9]/}