Grep Two Lines

[Solved] Grep Two Lines | Perl - Code Explorer | yomemimo.com
Question : grep two lines together

Answered by : distinct-dormouse-os81suftn8yv

$ grep -e sweet -e lemon file_type
This is a sweet
lemon.

Source : https://askubuntu.com/questions/859046/how-to-use-grep-for-2-different-lines | Last Update : Sun, 10 May 20

Question : grep two lines

Answered by : paulo-yjl1tqmpvrf6

$ grep -A1 text
-AX tells grep to display 'X' amount of lines after line of match.
Use -BX to do the same but before.

Source : | Last Update : Wed, 06 Oct 21

Answers related to grep two lines

Code Explorer Popular Question For Perl