App-Greple
view release on metacpan or search on metacpan
script/greple view on Meta::CPAN
Abort the operation.
=item B<ignore>
Ignore error and continue to read anyway.
=back
You may occasionally want to find text in binary data. Next command
will work like L<strings(1)> command.
greple -o --re '(?a)\w{4,}' --error=retry --uc /bin/*
If you want read all files as binary data, use C<--icode=binary>
instead.
=item B<-w>, B<--warn> I<type>=[C<0>,C<1>]
Control runtime message mainly about file operation related to
C<--error> option. Repeatable. Value is optional and 1 is assumed
when omitted. So C<-wall> option is the same as C<-wall=1> and enables
all messages, and C<-wall=0> disables all.
Types are:
=over 4
=item B<read>
(Default 0) Errors occurred during file read. Mainly unicode related
errors when reading binary or ambiguous text file.
=item B<skip>
(Default 1) File skip message.
=item B<retry>
(Default 0) File retry message.
=item B<begin>
(Default 0) When C<--begin> function died with C</^SKIP/i> message,
the file is skipped without any notice. Enables this to see the dying
message.
=item B<all>
Set same value for all types.
=back
=item B<--alert> [ C<size>=#, C<time>=# ]
Set alert parameter for large file. B<Greple> scans whole file
content to know line borders, and it takes several seconds or more if
it contains large number of lines.
By default, if the target file contains more than B<512 * 1024
characters> (I<size>), B<2 seconds> timer will start (I<time>). Alert
message is shown when the timer expired.
To disable this alert, set the size as zero:
--alert size=0
=item B<-P>[I<n>], B<--parallel>[=I<n>]
(Experimental) Search multiple patterns in parallel using up to I<n>
child processes. When I<n> is omitted or zero, the number of CPU
cores is used. Note that a separate numeric argument following
B<-P> is taken as its value; use the attached form (C<-P4>) or C<-e>
to search a numeric pattern. This is effective when scanning a large file with
multiple time-consuming patterns. Function patterns are always
processed sequentially. Parallel processing is applied only when the
target text is larger than 1MB (can be changed by
C<GREPLE_PARALLEL_THRESHOLD> environment variable) and two or more
eligible patterns exist.
Also, line border decomposition is performed in another child
process, overlapping with the rest of the search process. The child
process is started when the first match is found, so no extra process
is created for unmatched files. This works even with a single search
pattern.
=item B<-Mdebug>, B<-d>I<x>
Debug option is described in L<App::Greple::debug> module.
=back
=head1 ENVIRONMENT and STARTUP FILE
=over 7
=item B<GREPLEOPTS>
Environment variable GREPLEOPTS is used as a default options. They
are inserted before command line options.
=item B<GREPLE_NORC>
If set non-empty string, startup file F<~/.greplerc> is not processed.
=item B<GREPLE_PARALLEL_THRESHOLD>
Minimum text size to enable parallel pattern matching with the
B<--parallel> option. Default is 1048576 (1MB).
=item B<DEBUG_GETOPT>
Enable L<Getopt::Long> debug option.
=item B<DEBUG_GETOPTEX>
Enable L<Getopt::EX> debug option.
=item B<NO_COLOR>
( run in 0.821 second using v1.01-cache-2.11-cpan-0b5f733616e )