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,13 +12,13 @@ source: https://github.com/tldr-pages/tldr.git
`bzgrep "{{search_pattern}}" {{path/to/file}}`
- Use extended `regex` (supports `?`, `+`, `{}`, `()`, and `|`), in case-insensitive mode:
- Recursively search files in a bzip2 compressed `.tar` archive for a pattern:
`bzgrep {{[-E|--extended-regexp]}} {{[-i|--ignore-case]}} "{{search_pattern}}" {{path/to/file}}`
`bzgrep {{[-r|--recursive]}} "{{search_pattern}}" {{path/to/tar_file}}`
- Print 3 lines of [C]ontext around, [B]efore, or [A]fter each match:
`bzgrep --{{context|before-context|after-context}} {{3}} "{{search_pattern}}" {{path/to/file}}`
`bzgrep {{--context|--before-context|--after-context}} 3 "{{search_pattern}}" {{path/to/file}}`
- Print file name and line number for each match:
@@ -28,10 +28,10 @@ source: https://github.com/tldr-pages/tldr.git
`bzgrep {{[-o|--only-matching]}} "{{search_pattern}}" {{path/to/file}}`
- Recursively search files in a bzip2 compressed `.tar` archive for a pattern:
`bzgrep {{[-r|--recursive]}} "{{search_pattern}}" {{path/to/tar_file}}`
- Search `stdin` for lines that do not match a pattern:
`cat {{path/to/bz_compressed_file}} | bzgrep {{[-v|--invert-match]}} "{{search_pattern}}"`
- Use extended `regex` (supports `?`, `+`, `{}`, `()`, and `|`), in case-insensitive mode:
`bzgrep {{[-E|--extended-regexp]}} {{[-i|--ignore-case]}} "{{search_pattern}}" {{path/to/file}}`