From cd666449b69746c36e4eafb98270a7d8bfdf94cc Mon Sep 17 00:00:00 2001 From: olli Date: Tue, 7 Nov 2023 16:02:19 +0100 Subject: [PATCH] data quality --- dabo/analyze.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/dabo/analyze.sh b/dabo/analyze.sh index 1731477..0d9e960 100755 --- a/dabo/analyze.sh +++ b/dabo/analyze.sh @@ -54,9 +54,9 @@ function analyze { echo "$(head -n1 ${file}),Market Perrormance,Score,Buy Score,Sell Score,InTrade,Inetrim Result" >analyze-${analyzedate}/chart-${tmpfile} # Chart Part End - #for line in $(egrep "^${ANALYZE_TIME}" "$file" | grep -v ',,,') + #for line in $(egrep "^${ANALYZE_TIME}" "$file" | grep -v ',,') local f_lines - mapfile -t f_lines <<<$(egrep "^${ANALYZE_TIME}" "$file" | grep -v ',,,') + mapfile -t f_lines <<<$(egrep "^${ANALYZE_TIME}" "$file" | grep -v ',,') for line in "${f_lines[@]}" do # Chart Part @@ -127,7 +127,7 @@ function analyze { complete_result=$(g_calc "$complete_result+$result" | xargs printf "%.2f") done - hodlresult=$(g_percentage-diff $(egrep "^${ANALYZE_TIME}" "$file" | grep -v ',,,' | head -n1 | cut -d, -f2) $(egrep "^${ANALYZE_TIME}" "$file" | grep -v ',,,' | tail -n1 | cut -d, -f2)) + hodlresult=$(g_percentage-diff $(egrep "^${ANALYZE_TIME}" "$file" | grep -v ',,' | head -n1 | cut -d, -f2) $(egrep "^${ANALYZE_TIME}" "$file" | grep -v ',,' | tail -n1 | cut -d, -f2)) echo "COMPLETE:RESULT:$(basename "$file" | cut -d. -f1):: ${complete_result}% HODL:${hodlresult}% analyze-${analyzedate}/${tmpfile}.log $file" | perl -pe 's/ /\t/g; s/:/ /g' | tee -a ${g_tmp}/output-${tmpfile} echo "=====================================" >>${g_tmp}/output-${tmpfile} @@ -192,7 +192,7 @@ for file in $@ do echo "${file}" | egrep -q "BALANCE|-INDEX" && continue - lines=$(egrep "^${ANALYZE_TIME}" "$file" | grep -v ',,,' | wc -l) + lines=$(egrep "^${ANALYZE_TIME}" "$file" | grep -v ',,' | wc -l) if [ $lines -lt 150 ] then g_echo "Only $lines lines for given timeframe (${ANALYZE_TIME}) in $file - ignoring files with less then 150!"