When I run the following program
for i in {0..18}; do
for j in {0..18}; do
for k in {0..18}; do
echo $i $j $k
done
done
done
I get the disired output like
0 0 0
0 0 1
0 0 2
and so on
However when I calculate the loop size like this:
steps=$((360/20))
echo $steps
for i in {0..$steps}; do
for j in {0..$steps}; do
for k in {0..$steps}; do
echo $i $j $k
done
done
done
I get the following output:
{0..18} {0..18} {0..18}
How can I get the desired output like in the first script? What's my error here?