awk方式:
# awk 'BEGIN{for(i=1;i<=9;i++){for(j=1;j<=i;j++){printf j"x"i"="i*j "\t"} print ""}}'
for循环方式:
#!/bin/bash
for i in `seq `
do
for j in `seq `
do
[ $j -le $i ] && echo -ne "$j*$i=$((i*j))\t"
done
echo -e " "
done
2024-04-05 21:14:07
awk方式:
# awk 'BEGIN{for(i=1;i<=9;i++){for(j=1;j<=i;j++){printf j"x"i"="i*j "\t"} print ""}}'
for循环方式:
#!/bin/bash
for i in `seq `
do
for j in `seq `
do
[ $j -le $i ] && echo -ne "$j*$i=$((i*j))\t"
done
echo -e " "
done