I have the following code in an .sh file:
for num in {1..10} do echo $num done Which should print numbers from 1 to 10. But, this is what I get:
{1..10} Also, using C-like sytax doesn't work either:
for ((i=1; i<=10; i++)) This gets me an error:
Syntax error: Bad for loop variable The version of bash that I have is 4.2.25.
bashassh, it won't work; if you executebashasbash, it will work.