for ((a=1;a<=9;a++)) do for ((b=1;b<=a;b++)) do c=$[a*b] echo -n -e "$a*$b=$c\t" done echo " " done
#!/bin/bash for ((i=1;i<=50;i++)) do echo -n "*" done echo " "
#!/bin/bash for ((i=1;i<=5;i++)) do for ((a=1;a<=50;a++)) do echo -n "*" done echo " " done
#!/bin/bash for ((a=1;a<=15;a++)) do for ((b=1;b<=a;b++)) do echo -n "*" done echo "" done
#!/bin/bash for ((a=1;a<=15;a++)) do for ((b=1;b<=a;b++)) do echo -n " " done for ((c=15;c>=a;c--)) do echo -n "*" done echo "" done
#!/bin/bash for ((a=1;a<=12;a++)) do for ((b=12;b>=a;b--)) do echo -n " " done for ((c=1;c<=a;c++)) do echo -n "*" done for ((d=2;d<=a;d++)) do echo -n "*" done echo "" done
#!/bin/bash for ((a=1;a<=12;a++)) do for ((b=12;b>=a;b--)) do echo -n " " done for ((c=1;c<=a*2-1;c++)) do echo -n "*" done echo "" done
#!/bin/bash for ((a=1;a<=12;a++)) do for ((b=12;b>=a;b--)) do echo -n " " done for ((c=1;c<=a;c++)) do echo -n "*" done for ((d=11;d>=a;d--)) do echo -n "*" done echo "" done
#!/bin/bash for ((i=1;i<=10;i++)) do for ((a=1;a<=8;a++)) do echo -n "*" done for ((b=1;b<=i;b++)) do echo -n "*" done echo " " done
#!/bin/bash for ((i=1;i<=10;i++)) do for ((a=10;a>=i;a--)) do echo -n " " done for ((b=1;b<=i;b++)) do echo -n "*" done for ((c=1;c<=11;c++)) do echo -n "*" done echo " " done
#!/bin/bash for ((i=1;i<=9;i++)) do for ((a=9;a>=i;a--)) do echo -n " " done for ((b=1;b<+9;b++)) do echo -n "*" done for ((c=1;c<=$[i*2-1];c++)) do echo -n "*" done echo " " done
#!/bin/bash read -p "请输入大小:" s for ((a=1;a<=s;a++)) do for ((b=s;b>=a;b--)) do echo -n " " done c=$[a*2-1] for d in $(seq 1 $c) do echo -n "*" done echo "" done for ((e=s-1;e>=1;e--)) do for ((f=s;f>=e;f--)) do echo -n " " done for ((h=e;h>=1;h--)) do echo -n "*" done for ((m=e-1;m>=1;m--)) do echo -n "*" done echo "" done