mirror of
https://github.com/tldr-pages/tldr.git
synced 2025-08-03 21:15:32 +02:00
grep: add flags for lines before and after the match (#1020)
This commit is contained in:
parent
71ee99ef6f
commit
bf955d43e6
1 changed files with 2 additions and 2 deletions
|
@ -19,9 +19,9 @@
|
|||
|
||||
`grep -E {{^regex$}} {{path/to/file}}`
|
||||
|
||||
- Print 3 lines of context around each match:
|
||||
- Print 3 lines of [C]ontext around, [B]efore, or [A]fter each match:
|
||||
|
||||
`grep -C 3 {{search_string}} {{path/to/file}}`
|
||||
`grep -{{C|B|A}} 3 {{search_string}} {{path/to/file}}`
|
||||
|
||||
- Print the count of matches instead of the matching text:
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue