使用 Python/Jython 复制范围内的行
我有一个不断更新的服务器日志文件。 在执行一些脚本之后,我想将执行的相关部分从服务器日志收集到执行日志中。
基本上,我需要在测试开始之前捕获服务器日志的最后行号(我已经知道如何做),比如 X,然后在执行后,将行从 X 复制到新的服务器日志结束,现在,X+1000。
如何仅复制 X 行到 X+1000 行?
谢谢,阿萨夫
I have a server log file which is constantly updated.
after some script execution, I want to collect the relevant part of my execution from the server log into an execution log.
Basically, I need to capture the last line number of my server log before the test started (which I already know how to do), say X, and after execution, copy the lines from X to the new end of server log, now, X+1000.
How do I copy only lines X to X+1000?
Thanks, Assaf
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
试试这个
Try this