sed命令
- 替换test.txt文件中的hello为hello world
sed -i 's/hello/hello world/g' test.txt
- 替换当前目录下的所有文件中的hello为hello world
sed -i "s/hello/hello world/g" `grep 'hello' -rl ./`
sed命令
sed -i 's/hello/hello world/g' test.txt
sed -i "s/hello/hello world/g" `grep 'hello' -rl ./`