Import xz-5.0.3.
[dragonfly.git] / contrib / xz / src / scripts / xzgrep.1
1 .\"
2 .\" Original zgrep.1 for gzip: Jean-loup Gailly
3 .\"                            Charles Levert <charles@comm.polymtl.ca>
4 .\"
5 .\" Modifications for XZ Utils: Lasse Collin
6 .\"
7 .\" License: GNU GPLv2+
8 .\"
9 .TH XZGREP 1 "2010-09-27" "Tukaani" "XZ Utils"
10 .SH NAME
11 xzgrep \- search compressed files for a regular expression
12 .SH SYNOPSIS
13 .B xzgrep
14 .RI [ grep_options ]
15 .RB [ \-e ]
16 .I pattern
17 .IR file "..."
18 .br
19 .B xzegrep
20 .RB ...
21 .br
22 .B xzfgrep
23 .RB ...
24 .br
25 .B lzgrep
26 .RB ...
27 .br
28 .B lzegrep
29 .RB ...
30 .br
31 .B lzfgrep
32 .RB ...
33 .SH DESCRIPTION
34 .B xzgrep
35 invokes
36 .BR grep (1)
37 on
38 .I files
39 which may be either uncompressed or compressed with
40 .BR xz (1),
41 .BR lzma (1),
42 .BR gzip (1),
43 or
44 .BR bzip2 (1).
45 All options specified are passed directly to
46 .BR grep (1).
47 .PP
48 If no
49 .I file
50 is specified, then standard input is decompressed if necessary
51 and fed to
52 .BR grep (1).
53 When reading from standard input,
54 .BR gzip (1)
55 and
56 .BR bzip2 (1)
57 compressed files are not supported.
58 .PP
59 If
60 .B xzgrep
61 is invoked as
62 .B xzegrep
63 or
64 .B xzfgrep
65 then
66 .BR egrep (1)
67 or
68 .BR fgrep (1)
69 is used instead of
70 .BR grep (1).
71 The same applies to names
72 .BR lzgrep ,
73 .BR lzegrep ,
74 and
75 .BR lzfgrep ,
76 which are provided for backward compatibility with LZMA Utils.
77 .PP
78 .SH ENVIRONMENT
79 .TP
80 .B GREP
81 If the
82 .B GREP
83 environment variable is set,
84 .B xzgrep
85 uses it instead of
86 .BR grep (1),
87 .BR egrep (1),
88 or
89 .BR fgrep (1).
90 .SH "SEE ALSO"
91 .BR grep (1),
92 .BR xz (1),
93 .BR gzip (1),
94 .BR bzip2 (1),
95 .BR zgrep (1)