Usage:

zzgrep [ option ... ] [ - ] regex file-or-dir ...
Reads file or all files under dir and prints all lines which contain matches of the regex.
zzgrep [ option ... ] regex
Reads STDIN and prints all lines which contain matches of the regex.

Options:

--help
Print this text and terminate.
--7z-input-file-password value
Password to decrypt password-protected 7ZIP input files.
--zip-input-file-password value
Password to decrypt password-protected zip archive entries.
--password value
All of the above.

File Selection:

--dont-sort-directory-members
By default directory members are sorted lexicographically in order to achieve deterministic results.
--look-into glob
Look into compressed and archive contents if "format:path" matches the glob. The default is to look into any recognised archive or compressed contents.
Supported archive formats in this runtime configuration are:
${archive.formats}
Supported compression formats in this runtime configuration are:
${compression.formats}
--exclude regex
--include regex
Excludes files and archive entries from the search iff the file's / archive entry's path matches the regex.

Any number of --exclude and --include options can be given, and later take precedence over the earlier.

The default is that all files and archive entries are included; thus you would always begin with a --exclude option.

--zip
--zz
--nested-zip
--gzip
Deprecated - Use --look-into instead.

Contents Processing:

--input-encoding charset
Input contents encoding, default is "${file.encoding}".
--output-encoding charset
Contents encoding, default is "${file.encoding}".
--encoding charset
Input and output contents encoding, default is "${file.encoding}".
-i
--ignore-case
Ignore case distinctions.
-v
--inverted
Select non-matching lines.
--da
--disassemble-class-files
--da-verbose
When disassembling .class files, include a constant pool dump, constant pool indexes, and hex dumps of all attributes in the disassembly output.
--da-source-directory directory
When disassembling .class files, look for source files in this directory. Source file loading is disabled by default.
--da-no-lines
--disassemble-class-files-but-hide-lines
Don't print line numbers in the disassembly.
--da-no-vars
--disassemble-class-files-but-hide-vars
Don't print variable names in the disassembly.
--da-symbolic-labels
When disassembling .class files, use symbolic labels (e.g. "L12") instead of numeric labels (like "#123").
-e regex
--regexp regex
--regex regex
Useful for multiple regexes or regexes starting with "-"

Output Generation:

By default, print each matching line, prefixed with the filename/path (iff two or more files are specified on the command line).

-c
--count
Print only filename/path, colon, and match count.
-l
--list
--files-with-matches
Print only filename/path of documents containing matches.
-L
--files-without-match
Print only filename/path of documents that do not contain any matches.
--label value
Print this instead of filename/path
-H
--with-path
--with-filename
Prefix each match with the document filename/path (default if two or more files are specified on the command line)
-h
--no-path
--no-filename
Do not prefix each match with the document path (default if zero or one files are specified on the command line)
-n
--line-number
Prefix each match with the line number
-b
--byte-offset
Prefix each match with the byte offset
-B n
--before-context n
Print n lines of context before matching lines
-A n
--after-context n
Print n lines of context after matching lines
-C n
--context n
Print n lines of context before and after matching lines
-o
--only-matching
Print only the matched parts; prints one line per match
-m n
--max-count n
Stop reading after n matching lines
-q
--quiet
--silent
Suppress all normal output.
--nowarn
Suppress all messages except errors.
--verbose
Print the names of files and archive entries that are searched.
--debug
Print verbose and debug messages.
--log level:logger:handler:formatter:format
Add logging at level FINE on logger "de.unkrig" to STDERR using the FormatFormatter and SIMPLE format, or the given arguments (which are all optional).

Example globs:

dir/file
File "file" in directory "dir"
file.gz%
Compressed file "file.gz"
file.zip!dir/file
Entry "dir/file" in archive file "dir/file.zip"
file.tar.gz%!dir/file
Entry "dir/file" in the compressed archive file "file.tar.gz"
*/x
File "x" in an immediate subdirectory
**/x
File "x" in any subdirectory
***/x
File "x" in any subdirectory, or any entry "**/x" in any archive file in any subdirectory
a,dir/file.7z!dir/b
File "a" and entry "dir/b" in archive file "dir/file.7z"
~*.c
Files that don't end with ".c"
~*.c~*.h
Files that don't end with ".c" or ".h"
~*.c~*.h,foo.c
"foo.c" plus all files that don't end with ".c" or ".h"

Exit status is 0 if any line was selected, 1 otherwise; if any error occurs, the exit status is 2.