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
精彩评论