On 05/12/2010 01:27 PM, Peng Yu wrote:
x=10 for i in {1..$x}; do echo $i; doneThe above code give me {1..10} , rather than printing numbers from 1 to 10. I'm wondering how to use variable in a range?
This works for me; x=10; for i in $(eval echo {1..$x}); do echo $i; done But is not so cute. RR