Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

grep lines before and after

# display 3 lines before and after matchline
rg -C 3 "keyword"
Source by unix.stackexchange.com #
 
PREVIOUS NEXT
Tagged: #grep #lines
ADD COMMENT
Topic
Name
5+5 =