linux sed 批量替换多个文件中的字符串
2016-08-29 20:58
309 查看
一、linux sed 批量替换多个文件中的字符串
sed -i "s/oldstring/newstring/g" `grep oldstring -rl yourdir`
例如:替换/home下所有文件中的www.bcak.com.cn为bcak.com.cn
sed -i "s/www.bcak.com.cn/bcak.com.cn/g" `grepwww.bcak.com.cn -rl /home`
sed -i "s/oldstring/newstring/g" `grep oldstring -rl yourdir`
例如:替换/home下所有文件中的www.bcak.com.cn为bcak.com.cn
sed -i "s/www.bcak.com.cn/bcak.com.cn/g" `grepwww.bcak.com.cn -rl /home`
相关文章推荐
- linux sed 批量替换多个文件中的字符串
- Linux sed 批量替换多个文件中的字符串
- linux sed 批量替换多个文件中的字符串
- linux sed 批量替换多个文件中的字符串
- linux sed 批量替换多个文件中的字符串
- linux sed 批量替换多个文件中的字符串
- linux sed 批量替换多个文件中的字符串
- linux sed 批量替换多个文件中的字符串
- linux sed 批量替换多个文件中的字符串
- linux sed 批量替换多个文件中的字符串
- Linux sed 批量替换多个文件中的字符串
- linux sed 批量替换多个文件中的字符串
- linux sed 批量替换多个文件中的字符串
- Linux sed 批量替换多个文件中的字符串
- linux sed 批量替换多个文件中的字符串
- linux sed 批量替换多个文件中的字符串
- linux sed 批量替换多个文件中的字符串
- linux sed 批量替换多个文件中的字符串
- linux sed 批量替换字符串
- Linux sed 批量替换字符串方法