Top and Flop 10 in Webpage

This commit is contained in:
olli 2023-06-22 16:45:25 +02:00
parent b69601abf2
commit 5e2ba357f9

View File

@ -87,10 +87,10 @@ function webpage {
echo $(cat trade-histories/*${f_asset_results} | awk "{ SUM += \$1} END { printf(\"%.2f\", SUM)}") >trade-histories/${f_asset}.complete_result
done
echo "<h3>Top 10</h3>" >>../index.html.tmp
grep [0-9] trade-histories/*.complete_result | sort -t: -k2 -rn | head -n 10 | cut -d/ -f2 | perl -pe 's/\.complete_result:/ /; s/$/%/' >>../index.html.tmp
grep [0-9] trade-histories/*.complete_result | sort -t: -k2 -rn | head -n 10 | cut -d/ -f2 | perl -pe 's/\.complete_result:/ /; s/$/ %<br>/' >>../index.html.tmp
echo "<h3>Flop 10</h3>" >>../index.html.tmp
grep [0-9] trade-histories/*.complete_result | sort -t: -k2 -n | head -n 10 | cut -d/ -f2 | perl -pe 's/\.complete_result:/ /; s/$/%/' >>../index.html.tmp
grep [0-9] trade-histories/*.complete_result | sort -t: -k2 -n | head -n 10 | cut -d/ -f2 | perl -pe 's/\.complete_result:/ /; s/$/ %<br>/' >>../index.html.tmp
echo '<h2>Latest trades</h2>' >>../index.html.tmp