For循环
九九乘法表
#!/bin/bash
for i in {1..9}
do
for j in seq $i
do
echo -e "${j}x${i}=$[i*j]\t\c"
done
echo
done

求奇数和:
#!/bin/bash
sum=0
for i in seq 1 2 100 求偶数和:seq 2 2 100
do
let sum+=i
let i++
done
echo $sum

批量该文件名后缀
#!/bin/bash
for i in {wang.conf,hao.bak,wh.html}
do
j=echo $i|sed -En 's/(.*)\.([^.]+)$/\1/gp'
mv $i $j.txt
done