From 2bf22dfee83a6866ae2ca06c80ada2d44d59ca70 Mon Sep 17 00:00:00 2001 From: olli Date: Wed, 10 May 2023 16:26:00 +0200 Subject: [PATCH] small fixes --- dabo/analyze.sh | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/dabo/analyze.sh b/dabo/analyze.sh index a67a7e6..7f49bc1 100755 --- a/dabo/analyze.sh +++ b/dabo/analyze.sh @@ -15,9 +15,6 @@ function analyze { local file=$1 tmpfile=$(basename "${file}") - # to avoid parallel output - sleep $(shuf -i 1-10 -n1) - . /etc/bash/gaboshlib/g_percentage-diff.bashfunc . dabo/functions/check_buy_conditions.sh . dabo/functions/check_sell_conditions.sh @@ -130,6 +127,15 @@ cp -r strategies analyze-${analyzedate}/ for file in $@ do echo "${file}" | egrep -q "BALANCE|MSCI-WORLD-INDEX" && continue + + lines=$(egrep "^${ANALYZE_TIME}" "$file" | grep -v ',,' | wc -l) + if [ $lines -lt 50 ] + then + g_echo "Only $lines lines for given timeframe (${ANALYZE_TIME}) in $file - ignoring files with less then 50!" + continue + fi + + if [ "${ANALYZE_BATCH}" -eq "0" ] then echo -n " \"analyze ${file}\"" >>/tmp/parallel-$$