Unix 为什么sed不';不行?

Unix 为什么sed不';不行?,unix,sed,replace,sh,space,Unix,Sed,Replace,Sh,Space,我有一个名为test.sh的文件 以下是test.sh中的内容: LC_ALL=C zgrep -hoi "an unexpected EOF" /data/log/test.log.gz >> temp.txt 我想将“意外EOF”替换为“App\u UnhandledException” 我还想将temp.txt替换为tempEOF.txt 我试过这个命令,但似乎不起作用。在我运行命令后,我没有看到任何被替换的内容 sed -i 's/an unexpected EOF/App

我有一个名为test.sh的文件 以下是test.sh中的内容:

LC_ALL=C zgrep -hoi "an unexpected EOF" /data/log/test.log.gz >> temp.txt
我想将
“意外EOF”
替换为
“App\u UnhandledException”

我还想将
temp.txt
替换为
tempEOF.txt

我试过这个命令,但似乎不起作用。在我运行命令后,我没有看到任何被替换的内容

sed -i 's/an unexpected EOF/App_UnhandledException/g' test.sh

我的命令怎么了

能否显示包含文件中“意外EOF”的示例行?从传输流接收到意外EOF或0字节。在System.Net.ConnectStream.Read(Byte[]buffer,Int32 offset,Int32 size)尝试添加-e开关。
sed-i-e的/…
-i
采用可选参数,因此将其后面的单词视为扩展名,而不是脚本。