开发者

Using Grep to get the line that had the match and the following line

I have a file of records. The first line has the name and the following line has the data associated with that person. I want to gre开发者_运维问答p for a persons name and get the line with the name and the line that follows.


grep -A 1 "person name" fileName


grep -C1 regex filename

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜