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 ./`