Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

grep lines after match

$ grep -A1 text

-AX tells grep to display 'X' amount of lines after line of match. 
Use -BX to do the same but before.
 
PREVIOUS NEXT
Tagged: #grep #lines #match
ADD COMMENT
Topic
Name
4+4 =