if 语句
echo 当前参数个数:$#
if [ $# -lt 3 ];
then echo 参数小于3;
elif [ $# -gt 5 ];
then echo 参数大于5;
fi;
To have broken heart means you have tired for something
for 语句
for (( x=1 ; x<=100 ; x=x+1 )); do
echo x=:$x ;
done ; 输出1~100
for (( x=1 ; x<=7 ;x=x+1 ));do
for (( k=1 ; k<=x ;k=k+1));
do
echo -n $k ;
done ; 输出 12
echo #用来换行 123
done; 1234
12345
123456
1234567
for(( x=1 ;x<=9 ; x=x+1 )); do
for(( k=1 ;k<=x ;k=k+1)) -------> 9 9 乘法表
do
echo -n " " $x*$k "=" $[ $x * $k] ;
done;
echo
done;
#echo [] "" must use flexibly
while 语句
echo while循环
(( x=1 )) #定义初始化值
while(( x<=10 ));do # 判断语句 其中do----相当于++
echo $x #输出语句
(( x=x+1 )) #迭代语句
done;