hi im new to this shell scripting. I was assigned to develop some code that increased from 0 to 9 in sort of a pyramid. This is what the output should look like.
0
01
012
0123
01234
012345
0123456
01234567
012345678
0123456789
here is my code please help because im confused. some advice would be really appreciated. thanks
#!/bin/bash
cnt=0
while [ $cnt -le 9 ]
do
echo $cnt
while [ $cnt -le 9 ]
do
cnt=$((cnt+1))
echo $cnt
done
done
echo
exit