你好sed -i test a test1 111txt 报错sed 1 111txt extra characters at the end of p command
您好,
这个错误是因为您的sed命令中缺少替换命令。如果您想要将"test1"替换为"test a test1",则可以使用如下命令:
sed -i 's/test1/test a test1/' 111.txt
这个命令将在111.txt文件中查找所有出现的"test1",并将其替换为"test a test1"。如果您只想在文件中的某些行中进行替换,则可以使用sed的地址功能来指定行范围。
希望这可以帮助到您!
原文地址: https://www.cveoy.top/t/topic/bFy6 著作权归作者所有。请勿转载和采集!