mirror of
https://github.com/tldr-pages/tldr.git
synced 2026-08-29 04:21:03 +08:00
{e, f, r, bze, bzf, ze, zf}grep: convert to alias; {lze, lzf, xze, xzf}grep: standardize alias; zgrep: fix description (#19920)
This commit is contained in:
+3
-24
@@ -1,28 +1,7 @@
|
||||
# bzegrep
|
||||
|
||||
> Find extended `regex` patterns in `bzip2` compressed files using `egrep`.
|
||||
> More information: <https://manned.org/bzegrep>.
|
||||
> This command is an alias of `bzgrep --extended-regexp`.
|
||||
|
||||
- Search for extended `regex` (supporting `?`, `+`, `{}`, `()` and `|`) in a compressed file (case-sensitive):
|
||||
- View documentation for the original command:
|
||||
|
||||
`bzegrep "{{search_pattern}}" {{path/to/file}}`
|
||||
|
||||
- Search for extended `regex` (supporting `?`, `+`, `{}`, `()` and `|`) in a compressed file (case-insensitive):
|
||||
|
||||
`bzegrep {{[-i|--ignore-case]}} "{{search_pattern}}" {{path/to/file}}`
|
||||
|
||||
- Search for lines that do not match a pattern:
|
||||
|
||||
`bzegrep {{[-v|--invert-match]}} "{{search_pattern}}" {{path/to/file}}`
|
||||
|
||||
- Print file name and line number for each match:
|
||||
|
||||
`bzegrep {{[-H|--with-filename]}} {{[-n|--line-number]}} "{{search_pattern}}" {{path/to/file}}`
|
||||
|
||||
- Search for lines matching a pattern, printing only the matched text:
|
||||
|
||||
`bzegrep {{[-o|--only-matching]}} "{{search_pattern}}" {{path/to/file}}`
|
||||
|
||||
- Recursively search files in a bzip2 compressed tar archive for a pattern:
|
||||
|
||||
`bzegrep {{[-r|--recursive]}} "{{search_pattern}}" {{path/to/file}}`
|
||||
`tldr bzgrep`
|
||||
|
||||
+3
-24
@@ -1,28 +1,7 @@
|
||||
# bzfgrep
|
||||
|
||||
> Find any fixed strings separated by new lines in `bzip2` compressed files using `fgrep`.
|
||||
> More information: <https://manned.org/bzfgrep>.
|
||||
> This command is an alias of `bzgrep --fixed-strings`.
|
||||
|
||||
- Search for lines matching the list of search strings separated by new lines in a compressed file (case-sensitive):
|
||||
- View documentation for the original command:
|
||||
|
||||
`bzfgrep "{{search_string}}" {{path/to/file}}`
|
||||
|
||||
- Search for lines matching the list of search strings separated by new lines in a compressed file (case-insensitive):
|
||||
|
||||
`bzfgrep {{[-i|--ignore-case]}} "{{search_string}}" {{path/to/file}}`
|
||||
|
||||
- Search for lines that do not match the list of search strings separated by new lines in a compressed file:
|
||||
|
||||
`bzfgrep {{[-v|--invert-match]}} "{{search_string}}" {{path/to/file}}`
|
||||
|
||||
- Print file name and line number for each match:
|
||||
|
||||
`bzfgrep {{[-H|--with-filename]}} {{[-n|--line-number]}} "{{search_string}}" {{path/to/file}}`
|
||||
|
||||
- Search for lines matching a pattern, printing only the matched text:
|
||||
|
||||
`bzfgrep {{[-o|--only-matching]}} "{{search_string}}" {{path/to/file}}`
|
||||
|
||||
- Recursively search files in a bzip2 compressed tar archive for the given list of strings:
|
||||
|
||||
`bzfgrep {{[-r|--recursive]}} "{{search_string}}" {{path/to/file}}`
|
||||
`tldr bzgrep`
|
||||
|
||||
+3
-24
@@ -1,28 +1,7 @@
|
||||
# egrep
|
||||
|
||||
> Find patterns in files using extended `regex` (supports `?`, `+`, `{}`, `()`, and `|`).
|
||||
> More information: <https://manned.org/egrep>.
|
||||
> This command is an alias of `grep --extended-regexp`.
|
||||
|
||||
- Search for a pattern within a file:
|
||||
- View documentation for the original command:
|
||||
|
||||
`egrep "{{search_pattern}}" {{path/to/file}}`
|
||||
|
||||
- Search for a pattern within multiple files:
|
||||
|
||||
`egrep "{{search_pattern}}" {{path/to/file1 path/to/file2 ...}}`
|
||||
|
||||
- Search `stdin` for a pattern:
|
||||
|
||||
`cat {{path/to/file}} | egrep {{search_pattern}}`
|
||||
|
||||
- Print file name and line number for each match:
|
||||
|
||||
`egrep {{[-H|--with-filename]}} {{[-n|--line-number]}} "{{search_pattern}}" {{path/to/file}}`
|
||||
|
||||
- Search for a pattern in all files recursively in a directory, ignoring binary files:
|
||||
|
||||
`egrep {{[-r|--recursive]}} --binary-files={{without-match}} "{{search_pattern}}" {{path/to/directory}}`
|
||||
|
||||
- Search for lines that do not match a pattern:
|
||||
|
||||
`egrep {{[-v|--invert-match]}} "{{search_pattern}}" {{path/to/file}}`
|
||||
`tldr grep`
|
||||
|
||||
+3
-25
@@ -1,29 +1,7 @@
|
||||
# fgrep
|
||||
|
||||
> Matches fixed strings in files.
|
||||
> Equivalent to `grep -F`.
|
||||
> More information: <https://www.gnu.org/software/grep/manual/grep.html>.
|
||||
> This command is an alias of `grep --fixed-strings`.
|
||||
|
||||
- Search for an exact string in a file:
|
||||
- View documentation for the original command:
|
||||
|
||||
`fgrep {{search_string}} {{path/to/file}}`
|
||||
|
||||
- Search only lines that match entirely in one or more files:
|
||||
|
||||
`fgrep {{[-x|--line-regexp]}} {{search_string}} {{path/to/file1 path/to/file2 ...}}`
|
||||
|
||||
- Count the number of lines that match the given string in a file:
|
||||
|
||||
`fgrep {{[-c|--count]}} {{search_string}} {{path/to/file}}`
|
||||
|
||||
- Show the line number in the file along with the line matched:
|
||||
|
||||
`fgrep {{[-n|--line-number]}} {{search_string}} {{path/to/file}}`
|
||||
|
||||
- Display all lines except those that contain the search string:
|
||||
|
||||
`fgrep {{[-v|--invert-match]}} {{search_string}} {{path/to/file}}`
|
||||
|
||||
- Display filenames whose content matches the search string at least once:
|
||||
|
||||
`fgrep {{[-l|--files-with-matches]}} {{search_string}} {{path/to/file1 path/to/file2 ...}}`
|
||||
`tldr grep`
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
# lzegrep
|
||||
|
||||
> This command is an alias of `xzgrep --extended-regexp`.
|
||||
> See also: `egrep`.
|
||||
|
||||
- View documentation for the original command:
|
||||
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
# lzfgrep
|
||||
|
||||
> This command is an alias of `xzgrep --fixed-strings`.
|
||||
> See also: `fgrep`.
|
||||
|
||||
- View documentation for the original command:
|
||||
|
||||
|
||||
+3
-21
@@ -1,25 +1,7 @@
|
||||
# rgrep
|
||||
|
||||
> Recursively find patterns in files using `regex`.
|
||||
> Equivalent to `grep -r`.
|
||||
> More information: <https://www.gnu.org/software/grep/manual/grep.html#Command_002dline-Options>.
|
||||
> This command is an alias of `grep --recursive`.
|
||||
|
||||
- Recursively search for a pattern in the current working directory:
|
||||
- View documentation for the original command:
|
||||
|
||||
`rgrep "{{search_pattern}}"`
|
||||
|
||||
- Recursively search for a case-insensitive pattern in the current working directory:
|
||||
|
||||
`rgrep {{[-i|--ignore-case]}} "{{search_pattern}}"`
|
||||
|
||||
- Recursively search for an extended `regex` pattern (supports `?`, `+`, `{}`, `()`, and `|`) in the current working directory:
|
||||
|
||||
`rgrep {{[-E|--extended-regexp]}} "{{search_pattern}}"`
|
||||
|
||||
- Recursively search for an exact string (disables `regex`) in the current working directory:
|
||||
|
||||
`rgrep {{[-F|--fixed-strings]}} "{{exact_string}}"`
|
||||
|
||||
- Recursively search for a pattern in a specified directory (or file):
|
||||
|
||||
`rgrep "{{search_pattern}}" {{path/to/file_or_directory}}`
|
||||
`tldr grep`
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
# xzegrep
|
||||
|
||||
> This command is an alias of `xzgrep --extended-regexp`.
|
||||
> See also: `egrep`.
|
||||
|
||||
- View documentation for the original command:
|
||||
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
# xzfgrep
|
||||
|
||||
> This command is an alias of `xzgrep --fixed-strings`.
|
||||
> See also: `fgrep`.
|
||||
|
||||
- View documentation for the original command:
|
||||
|
||||
|
||||
+3
-24
@@ -1,28 +1,7 @@
|
||||
# zegrep
|
||||
|
||||
> Find extended `regex` patterns in compressed files using `egrep`.
|
||||
> More information: <https://manned.org/zegrep>.
|
||||
> This command is an alias of `zgrep --extended-regexp`.
|
||||
|
||||
- Search for extended `regex` (supporting `?`, `+`, `{}`, `()`, and `|`) in a compressed file (case-sensitive):
|
||||
- View documentation for the original command:
|
||||
|
||||
`zegrep "{{search_pattern}}" {{path/to/file}}`
|
||||
|
||||
- Search for extended `regex` (supporting `?`, `+`, `{}`, `()`, and `|`) in a compressed file (case-insensitive):
|
||||
|
||||
`zegrep {{[-i|--ignore-case]}} "{{search_pattern}}" {{path/to/file}}`
|
||||
|
||||
- Search for lines that do not match a pattern:
|
||||
|
||||
`zegrep {{[-v|--invert-match]}} "{{search_pattern}}" {{path/to/file}}`
|
||||
|
||||
- Print file name and line number for each match:
|
||||
|
||||
`zegrep {{[-H|--with-filename]}} {{[-n|--line-number]}} "{{search_pattern}}" {{path/to/file}}`
|
||||
|
||||
- Search for lines matching a pattern, printing only the matched text:
|
||||
|
||||
`zegrep {{[-o|--only-matching]}} "{{search_pattern}}" {{path/to/file}}`
|
||||
|
||||
- Recursively search files in a compressed file for a pattern:
|
||||
|
||||
`zegrep {{[-r|--recursive]}} "{{search_pattern}}" {{path/to/file}}`
|
||||
`tldr zgrep`
|
||||
|
||||
+3
-21
@@ -1,25 +1,7 @@
|
||||
# zfgrep
|
||||
|
||||
> Matches fixed strings in possibly compressed files.
|
||||
> Equivalent to `grep --fixed-strings` with input decompressed first if necessary.
|
||||
> More information: <https://manned.org/zfgrep>.
|
||||
> This command is an alias of `zgrep --fixed-strings`.
|
||||
|
||||
- Search for an exact string in a file:
|
||||
- View documentation for the original command:
|
||||
|
||||
`zfgrep {{search_string}} {{path/to/file}}`
|
||||
|
||||
- Count the number of lines that match the given string in a file:
|
||||
|
||||
`zfgrep {{[-c|--count]}} {{search_string}} {{path/to/file}}`
|
||||
|
||||
- Show the line number in the file along with the matching lines:
|
||||
|
||||
`zfgrep {{[-n|--line-number]}} {{search_string}} {{path/to/file}}`
|
||||
|
||||
- Display all lines except those that contain the search string:
|
||||
|
||||
`zfgrep {{[-v|--invert-match]}} {{search_string}} {{path/to/file}}`
|
||||
|
||||
- List only filenames whose content matches the search string at least once:
|
||||
|
||||
`zfgrep {{[-l|--files-with-matches]}} {{search_string}} {{path/to/file1 path/to/file2 ...}}`
|
||||
`tldr zgrep`
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# zgrep
|
||||
|
||||
> Grep text patterns from files within compressed file (equivalent to `grep -Z`).
|
||||
> Grep text patterns from files within compressed files.
|
||||
> More information: <https://manned.org/zgrep>.
|
||||
|
||||
- Grep a pattern in a compressed file (case-sensitive):
|
||||
|
||||
Reference in New Issue
Block a user