How to show only next line after the matched one?

grep -A1 'blah' logfile

Thanks to this command for every line that has ‘blah’ in it, I get the output of the line that contains ‘blah’ and the next line that follows in the logfile. It might be a simple one but I can’t find a way to omit the line that has ‘blah’ and only show next line in the output.

13 Answers
13

Leave a Comment