6、找出100以内能被3整除的数,每行显示8个数,然后换行显示;
#!/bin/bash
m=1
for (( i=1; i<100; i++ ))
do
let "temp1=i%3"
if [ "$temp1" -ne 0 ]
then
continue
fi
echo -n "$i"
let "temp2=m%8"
if [ "$temp2" -eq 0 ]
then
echo " "
fi
let "m++"
done
