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!"