xz/src/scripts/xzgrep.1

101 lines
1.5 KiB
Groff
Raw Normal View History

.\"
.\" Original zgrep.1 for gzip: Jean-loup Gailly
.\" Charles Levert <charles@comm.polymtl.ca>
.\"
.\" Modifications for XZ Utils: Lasse Collin
.\"
.\" License: GNU GPLv2+
.\"
.TH XZGREP 1 "2020-12-05" "Tukaani" "XZ Utils"
2007-12-08 22:42:33 +00:00
.SH NAME
xzgrep \- search compressed files for a regular expression
2007-12-08 22:42:33 +00:00
.SH SYNOPSIS
.B xzgrep
2007-12-08 22:42:33 +00:00
.RI [ grep_options ]
.RB [ \-e ]
2007-12-08 22:42:33 +00:00
.I pattern
.RI [ file... ]
2007-12-08 22:42:33 +00:00
.br
.B xzegrep
\&...
.br
.B xzfgrep
\&...
.br
.B lzgrep
\&...
.br
2007-12-08 22:42:33 +00:00
.B lzegrep
\&...
2007-12-08 22:42:33 +00:00
.br
.B lzfgrep
\&...
2007-12-08 22:42:33 +00:00
.SH DESCRIPTION
.B xzgrep
invokes
2007-12-08 22:42:33 +00:00
.BR grep (1)
on
.I files
which may be either uncompressed or compressed with
.BR xz (1),
.BR lzma (1),
.BR gzip (1),
.BR bzip2 (1),
.BR lzop (1),
or
.BR zstd (1).
All options specified are passed directly to
.BR grep (1).
.PP
If no
.I file
is specified, then standard input is decompressed if necessary
and fed to
.BR grep (1).
When reading from standard input,
.BR gzip (1),
.BR bzip2 (1),
.BR lzop (1),
and
.BR zstd (1)
compressed files are not supported.
2007-12-08 22:42:33 +00:00
.PP
If
.B xzgrep
2007-12-08 22:42:33 +00:00
is invoked as
.B xzegrep
2007-12-08 22:42:33 +00:00
or
.B xzfgrep
2007-12-08 22:42:33 +00:00
then
.B grep \-E
2007-12-08 22:42:33 +00:00
or
.B grep \-F
2007-12-08 22:42:33 +00:00
is used instead of
.BR grep (1).
The same applies to names
.BR lzgrep ,
.BR lzegrep ,
and
.BR lzfgrep ,
which are provided for backward compatibility with LZMA Utils.
.SH ENVIRONMENT
.TP
.B GREP
If the
.B GREP
environment variable is set,
.B xzgrep
uses it instead of
2007-12-08 22:42:33 +00:00
.BR grep (1),
.BR "grep \-E" ,
or
.BR "grep \-F" .
.SH "SEE ALSO"
.BR grep (1),
.BR xz (1),
.BR gzip (1),
.BR bzip2 (1),
.BR lzop (1),
.BR zstd (1),
.BR zgrep (1)