#!/bin/bash
a=1
while [ $a -le 5 ]
do
b=1
while [ $b -le $a ]
do
echo -n $b
let b++
done
let a++
echo
done
-----------------------------------------------------------
results:
1
12
123
1234
12345
==================================
#!/bin/bash
a=1
c=1
while [ $a -le 9 ]
do
b=$[ $a-$c+1 ]
while [ $b -le $a ]
do
echo -n $b
let b++
done
let a=a+2
let c++
echo
done
------------------------------------------------------------
#!/bin/bash
for i in `seq 5`
do
let j=$i;
for k in `seq $i`
do
echo -n $j;
let j++;
done
echo -e "\n"
done
------------------------------------------------------------
results:
1
23
345
4567
56789
==================================