[root@test baojing]# cat piliang.sh
#!/bin/bash
find /root/baojing/ -name "*.sh" | while read f
do
sed -i 's/www.sina.com/www.china.com/g' $f
done


说明:/root/baojing/ 目录下所有.sh 结尾的文件里包含www.sina.com 都替换成www.china.com