sed -i "s/oldstring/newstring/g" `grep oldstring -rl yourdir`
例如:替换/home下所有文件中的为admin99.net
sed -i "s/www.admin99.net/admin99.net/g" `grep -rl /home`