Grep Display More Lines

[Solved] Grep Display More Lines | Perl - Code Explorer | yomemimo.com
Question : grep more lines around

Answered by : perfect-polecat-b60par3jy0dp

grep foo -A [line_after]
grep foo -B [line_before]

Source : | Last Update : Mon, 26 Jul 21

Question : grep show lines above and below

Answered by : important-iguana-rxht8hjyf2vv

grep -C 3 foo README.txt

Source : https://stackoverflow.com/questions/9081/grep-a-file-but-show-several-surrounding-lines | Last Update : Sun, 05 Jul 20

Question : grep find and show lines after

Answered by : ricardo-hincapie

# Use the -A flag.
# Example:
iptables -L | grep FORWARD -A 10

Source : | Last Update : Thu, 07 Oct 21

Question : grep display more lines

Answered by : taha-zouhair

# display 3 lines before and after matchline
rg -C 3 "keyword"

Source : | Last Update : Tue, 23 Aug 22

Answers related to grep display more lines

Code Explorer Popular Question For Perl