I'm twiting

访问统计

free counters

linux sed 批量替换多个文档中的字符串

sed -i "s/oldstring/newstring/g" `grep oldstring -rl yourdir`
例如:替换 /home/praxis/ams 下任何文档中的 192.168.0.35192.168.0.21
sed -i "s/192.168.0.35/192.168.0.21/g" `grep 192.168.0.35 -rl /home/praxis/ams`

Leave a Reply

 

 

 

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>