Update cheatsheets

This commit is contained in:
ivuorinen
2025-12-24 00:21:36 +00:00
parent 4e6886aa1f
commit 70f6f2ac08
27 changed files with 174 additions and 69 deletions

View File

@@ -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}}`