mirror of
https://github.com/ivuorinen/cheatsheet-tldr.git
synced 2026-03-13 10:59:20 +00:00
Update cheatsheets
This commit is contained in:
10
tldr/zgrep
10
tldr/zgrep
@@ -12,6 +12,10 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
`zgrep {{pattern}} {{path/to/compressed_file}}`
|
||||
|
||||
- Print 3 lines of [C]ontext around, [B]efore, or [A]fter each match:
|
||||
|
||||
`zgrep {{--context|--before-context|--after-context}} 3 {{pattern}} {{path/to/compressed_file}}`
|
||||
|
||||
- Grep a pattern in a compressed file (case-insensitive):
|
||||
|
||||
`zgrep {{[-i|--ignore-case]}} {{pattern}} {{path/to/compressed_file}}`
|
||||
@@ -28,10 +32,6 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
`zgrep {{[-e|--regexp]}} "{{pattern_1}}" {{[-e|--regexp]}} "{{pattern_2}}" {{path/to/compressed_file}}`
|
||||
|
||||
- Use extended `regex` (supporting `?`, `+`, `{}`, `()`, and `|`):
|
||||
- Use extended `regex` (supports `?`, `+`, `{}`, `()`, and `|`):
|
||||
|
||||
`zgrep {{[-E|--extended-regexp]}} {{regex}} {{path/to/file}}`
|
||||
|
||||
- Print 3 lines of [C]ontext around, [B]efore, or [A]fter each match:
|
||||
|
||||
`zgrep --{{context|before-context|after-context}} 3 {{pattern}} {{path/to/compressed_file}}`
|
||||
|
||||
Reference in New Issue
Block a user