Ah, the magic of Bash!

for y in {1..30..7}; do
for x in {60..1}; do
DA=$(date -d "-$(($x+$y)) days" +%Y-%m-%d);
A=$(date -d "-$x days" +%Y-%m-%d);
echo -n "Simulazione per $y giorni da $DA a $A: ";
./zenbot.sh sim --strategy trend_ema_reversed --start $DA --end $A | grep "end balance" --after-context=2 |tr "\n" "\t"; echo "...";
done;
done |tee valutazione.txt

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.