异常 [root@VM-16-10-centos ~]# echo "This is a test" | sed 's/test/big test' sed: -e expression #1, char 15: unterminated `s' command 错误代码 echo "This is a test" | sed 's/test/big test' 原因 sed命令的s命令格式应该是sed 's/待替换的字符串/替换后的字符串/'。即应该有三根斜杠/进行区分。 正确代码 echo "This is a test" | sed 's/test/big test/'