使用sed命令
1、替换test.txt文件中的hello为hello world
set -i 's/hello/hello world/g' test.txt
2、替换当前目录下的所有文件中的hello为hello world
set -i 's/hello/hello world/g' ls
使用sed命令
1、替换test.txt文件中的hello为hello world
set -i 's/hello/hello world/g' test.txt
2、替换当前目录下的所有文件中的hello为hello world
set -i 's/hello/hello world/g' ls