【发布时间】:2018-01-05 03:08:57
【问题描述】:
我需要与类似问题(Selecting a part of a file and copying that into new file in Linux)的答案(sed -n '200,700p' logfilename > destinationFilename)相反的东西。我需要排除一些行,例如从 200 到 700 并输出文件的其余部分,以便我可以将其复制到另一个文件。我该怎么做?
【问题讨论】:
我需要与类似问题(Selecting a part of a file and copying that into new file in Linux)的答案(sed -n '200,700p' logfilename > destinationFilename)相反的东西。我需要排除一些行,例如从 200 到 700 并输出文件的其余部分,以便我可以将其复制到另一个文件。我该怎么做?
【问题讨论】:
你会使用 sed '200,700d' 日志文件名 > 目标文件名
【讨论】: