Answers for "grep two lines"

2

grep two lines

$ grep -A1 text

-AX tells grep to display 'X' amount of lines after line of match. 
Use -BX to do the same but before.
Posted by: Guest on September-29-2021
1

grep two lines together

$ grep -e sweet -e lemon file_type
This is a sweet
lemon.
Posted by: Guest on May-03-2020

Code answers related to "Shell/Bash"

Browse Popular Code Answers by Language