I am trying to enumerate a range of integers using a variable but having some trouble.  When I typeecho {1..5}I get1 2 3 4 5However, when I type a variable, I am unable to get the enumeration.  For example$ num=5$ echo {1..$num}{1..5}I am stumped as to why the result is not the same.  I have tried using quotes and that has not helped either.  Can someone help or explain?
Expand variable in brace expansion
bash;variable substitution;brace expansion
You may use this: num=5; echo $(seq $num)Gives: 1 2 3 4 5Remark: $(...) syntax is command substitution.