Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

print next 10 lines after grep

grep -A 2 "app" mytext.txt //prints two lines after the match line
grep -B 2 "app" mytext.txt //prints two lines before the match line
 
PREVIOUS NEXT
Tagged: #print #lines #grep
ADD COMMENT
Topic
Name
3+5 =