xref: /freebsd/sys/contrib/zstd/programs/zstdgrep.1.md (revision 5ff13fbc199bdf5f0572845351c68ee5ca828e71)
10f743729SConrad Meyerzstdgrep(1) -- print lines matching a pattern in zstandard-compressed files
20f743729SConrad Meyer============================================================================
30f743729SConrad Meyer
40f743729SConrad MeyerSYNOPSIS
50f743729SConrad Meyer--------
60f743729SConrad Meyer
70f743729SConrad Meyer`zstdgrep` [*grep-flags*] [--] _pattern_ [_files_ ...]
80f743729SConrad Meyer
90f743729SConrad Meyer
100f743729SConrad MeyerDESCRIPTION
110f743729SConrad Meyer-----------
12*5ff13fbcSAllan Jude`zstdgrep` runs `grep (1)` on files, or `stdin` if no files argument is given, after decompressing them with `zstdcat (1)`.
130f743729SConrad Meyer
140f743729SConrad MeyerThe grep-flags and pattern arguments are passed on to `grep (1)`.  If an `-e` flag is found in the `grep-flags`, `zstdgrep` will not look for a pattern argument.
150f743729SConrad Meyer
16*5ff13fbcSAllan JudeNote that modern `grep` alternatives such as `ripgrep` (`rg`) support `zstd`-compressed files out of the box,
17*5ff13fbcSAllan Judeand can prove better alternatives than `zstdgrep` notably for unsupported complex pattern searches.
18*5ff13fbcSAllan JudeNote though that such alternatives may also feature some minor command line differences.
19*5ff13fbcSAllan Jude
200f743729SConrad MeyerEXIT STATUS
210f743729SConrad Meyer-----------
220f743729SConrad MeyerIn case of missing arguments or missing pattern, 1 will be returned, otherwise 0.
230f743729SConrad Meyer
240f743729SConrad MeyerSEE ALSO
250f743729SConrad Meyer--------
260f743729SConrad Meyer`zstd (1)`
270f743729SConrad Meyer
280f743729SConrad MeyerAUTHORS
290f743729SConrad Meyer-------
300f743729SConrad MeyerThomas Klausner <wiz@NetBSD.org>
31