public interface GrepOptions extends OptionSet<GrepOption>
grep
command.
It is recommended to use Grep.Options
to specify a valid
combination of options.
The options for the grep command are:
-i | --ignoreCase | Match lines ignoring the case when comparing the strings, also known from Unix with its acronym 'i'. | |||
-v | --invertMatch | Invert the match result, that is, a non-matching line is written to the output and a matching line is not. This option is also known from Unix with its acronym 'v'. | |||
-F | --fixedStrings | Use fixed-strings matching instead of regular expressions. This is
usually faster than the standard regexp version.
(This option is ignored if a | |||
-n | --lineNumber | Prefix each line of output with the line number within its input file. | |||
-c | --count | Suppress normal output; instead print a count of matching lines for
each input file. With the -v , --invertMatch option,
count non-matching lines. | |||
-l | --matchingFiles | Suppress normal output; instead print the name of each input file from which output would normally have been printed. The scanning will stop on the first match. | |||
-x | --wholeLine | Select only those matches that exactly match the whole line
excluding the terminating line ending.
(This option is ignored if a |
This interface serves as an alias for the extended interface to simplify the command signature methods by avoiding generic parameters.
Modifier and Type | Interface and Description |
---|---|
static class |
GrepOptions.Default
Default implementation for a modifiable option set.
|
Modifier and Type | Field and Description |
---|---|
static ValueConverter<GrepOptions> |
CONVERTER
Value converter for
GrepOptions based on an OptionSetConverters.OptionSetConverter . |
static GrepOptions |
EMPTY
Constant for an empty option set.
|
asSet, isSet, iterator, optionType, size, useAcronymFor
forEach, spliterator
static final GrepOptions EMPTY
static final ValueConverter<GrepOptions> CONVERTER
GrepOptions
based on an OptionSetConverters.OptionSetConverter
.Copyright © 2024. All rights reserved.