从匹配行到文件末尾打印文件中的行 [英] Print lines in file from the match line until end of file
本文介绍了从匹配行到文件末尾打印文件中的行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我写了以下 awk 来打印从匹配行到 EOF 的行
I wrote the following awk to print lines from the match line until EOF
awk '/match_line/,/*/' file
如何在 sed 中做同样的事情?
How can I do the same in sed?
推荐答案
sed -n '/matched/,$p' file
awk '/matched/,0' file
这篇关于从匹配行到文件末尾打印文件中的行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文