shell输出星星三角阵
要求输出
程序如下
#!/bin/bash
rows=4
for (( i=1; i<=rows; i++ ))
do
for (( j=1; j<=i; j++ ))
do
echo -n "* "
done
echo
done
for (( i=1; i<=rows; i++ ))
do
for (( j=1; j<=rows-i; j++ ))
do
echo -n "* "
done
echo
done
标签:星星,输出,shell,三角,rows,bin
From: https://www.cnblogs.com/rainbow7colours/p/17386487.html