1.打印形状
1 #!/bin/bash 2 # 打印等腰三角形 3 read -p "Please input the length: " n 4 for i in `seq 1 $n` 5 do 6 for ((j=$n;j>i;j--)) 7 do 8 echo -n " " 9 done 10 11 for m in `seq 1 $i` 12 do 13 echo -n "* " 14 done 15 echo 16 done
来源:https://www.cnblogs.com/kumunotes/p/12128204.html