0
不知道是否有人可以解释sed中Next(N)和next(n)命令之间的区别。我正在尝试跟踪。sed next&Next命令
这是以下我的输入文件
Consult Section 3.1 in the Owner and Operator Guide
Consult Section 3.1 in the Owner and Operator Guide
for a description of the tape drives
available on your system.
我是使用以下的(下一个命令)
/Operator/{
n
s/Owner and Operator Guide/Installation Guide/
}
结果是
Consult Section 3.1 in the Owner and Operator Guide
Consult Section 3.1 in the Installation Guide
for a description of the tape drives
available on your system.
然后我使用
/Operator/{
N
s/Owner and Operator Guide/Installation Guide/
}
结果是
Consult Section 3.1 in the Installation Guide
Consult Section 3.1 in the Owner and Operator Guide
for a description of the tape drives
available on your system.
可以请你解释一下为什么我得到两种不同的结果?我是否只需要在多行模式空间中使用Next命令(N)?以及在哪里使用next(n)命令。
如果我使用sed的/ Owner和Operator Guide/Installation Guide /'input.txt将按预期改变所有内容。