Is there a way to simplify stating 1 through to 10, for example in a for loop construct?
for x in 1 2 3 4 5 6 7 8 9 10
do
....
done
I have tried [1-10] (1-10) with no luck.. thanks
Is there a way to simplify stating 1 through to 10, for example in a for loop construct?
for x in 1 2 3 4 5 6 7 8 9 10
do
....
done
I have tried [1-10] (1-10) with no luck.. thanks
In bash I presume. Ty this:
i=0
while [ $i -lt 10 ]
do
echo $i
let "i++"
done
If bash...
for ((x=1; x<=10; x++))
do
echo $x
done