#!/bin/bash
echo "This is the multiple table."
for((i=1;i<=9;++i))
do
for((j=1;j<=i;j++))
do
echo -ne "$i*$j=$((i*j))\t"
done
echo
done
${dir_list[@]}
代入数组
#!/bin/bash
for i in `echo {1,2,3}*{1,2,3}`
do
echo $i | bc
done
通过通配功能,不需要for循环,echo {1,2,3……8,9}* {1,2,3……8,9}