Good day,
I was wondering how to properly pass a variable to a for
loop. Doesn't matter the syntax, I just want to pass the variable and count by two.
The issue:
when I write down:
r=0 ; for i in {"$r"..10..2}; do echo "Welcome $i times" ;done
I get:
Welcome {0..10..2} times
and not:
Welcome 0 times
Welcome 2 times
Welcome 4 times
Welcome 6 times
Welcome 8 times
Welcome 10 times
Thanks in advance for any clue