xzgrep.1 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  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 "2022-07-19" "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. .RI [ file... ]
  18. .br
  19. .B xzegrep
  20. \&...
  21. .br
  22. .B xzfgrep
  23. \&...
  24. .br
  25. .B lzgrep
  26. \&...
  27. .br
  28. .B lzegrep
  29. \&...
  30. .br
  31. .B lzfgrep
  32. \&...
  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. .BR bzip2 (1),
  44. .BR lzop (1),
  45. or
  46. .BR zstd (1).
  47. All options specified are passed directly to
  48. .BR grep (1).
  49. .PP
  50. If no
  51. .I file
  52. is specified, then standard input is decompressed if necessary
  53. and fed to
  54. .BR grep (1).
  55. When reading from standard input,
  56. .BR gzip (1),
  57. .BR bzip2 (1),
  58. .BR lzop (1),
  59. and
  60. .BR zstd (1)
  61. compressed files are not supported.
  62. .PP
  63. If
  64. .B xzgrep
  65. is invoked as
  66. .B xzegrep
  67. or
  68. .B xzfgrep
  69. then
  70. .B grep \-E
  71. or
  72. .B grep \-F
  73. is used instead of
  74. .BR grep (1).
  75. The same applies to names
  76. .BR lzgrep ,
  77. .BR lzegrep ,
  78. and
  79. .BR lzfgrep ,
  80. which are provided for backward compatibility with LZMA Utils.
  81. .SH EXIT STATUS
  82. .TP
  83. 0
  84. At least one match was found from at least one of the input files.
  85. No errors occurred.
  86. .TP
  87. 1
  88. No matches were found from any of the input files.
  89. No errors occurred.
  90. .TP
  91. >1
  92. One or more errors occurred.
  93. It is unknown if matches were found.
  94. .SH ENVIRONMENT
  95. .TP
  96. .B GREP
  97. If the
  98. .B GREP
  99. environment variable is set,
  100. .B xzgrep
  101. uses it instead of
  102. .BR grep (1),
  103. .BR "grep \-E" ,
  104. or
  105. .BR "grep \-F" .
  106. .SH "SEE ALSO"
  107. .BR grep (1),
  108. .BR xz (1),
  109. .BR gzip (1),
  110. .BR bzip2 (1),
  111. .BR lzop (1),
  112. .BR zstd (1),
  113. .BR zgrep (1)