App-Greple

 view release on metacpan or  search on metacpan

README.md  view on Meta::CPAN

    Show module file contents.  Use with `-M` option.

- **--path**

    Show module file path.  Use with `-M` option.

- **--norc**

    Do not read startup file: `~/.greplerc`.  This option has to be
    placed before any other options including `-M` module options.
    Setting `GREPLE_NORC` environment has the same effect.

- **--error**=_action_

    As **greple** tries to read data as a character string, sometimes fails
    to convert them into internal representation, and the file is skipped
    without processing by default.  This works fine to skip binary
    data. (**skip**)

    Also sometimes encounters code mapping error due to character
    encoding.  In this case, reading the file as a binary data helps to
    produce meaningful output. (**retry**)

    This option specifies the action when data read error occurred.

    - **skip**

        Skip the file.  Default.

    - **retry**

        Retry reading the file as a binary data.

    - **fatal**

        Abort the operation.

    - **ignore**

        Ignore error and continue to read anyway.

    You may occasionally want to find text in binary data.  Next command
    will work like [strings(1)](http://man.he.net/man1/strings) command.

        greple -o --re '(?a)\w{4,}' --error=retry --uc /bin/*

    If you want read all files as binary data, use `--icode=binary`
    instead.

- **-w**, **--warn** _type_=\[`0`,`1`\]

    Control runtime message mainly about file operation related to
    `--error` option.  Repeatable.  Value is optional and 1 is assumed
    when omitted.  So `-wall` option is the same as `-wall=1` and enables
    all messages, and `-wall=0` disables all.

    Types are:

    - **read**

        (Default 0) Errors occurred during file read.  Mainly unicode related
        errors when reading binary or ambiguous text file.

    - **skip**

        (Default 1) File skip message.

    - **retry**

        (Default 0) File retry message.

    - **begin**

        (Default 0) When `--begin` function died with `/^SKIP/i` message,
        the file is skipped without any notice.  Enables this to see the dying
        message.

    - **all**

        Set same value for all types.

- **--alert** \[ `size`=#, `time`=# \]

    Set alert parameter for large file.  **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 **512 \* 1024
    characters** (_size_), **2 seconds** timer will start (_time_).  Alert
    message is shown when the timer expired.

    To disable this alert, set the size as zero:

        --alert size=0

- **-P**\[_n_\], **--parallel**\[=_n_\]

    (Experimental) Search multiple patterns in parallel using up to _n_
    child processes.  When _n_ is omitted or zero, the number of CPU
    cores is used.  Note that a separate numeric argument following
    **-P** is taken as its value; use the attached form (`-P4`) or `-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
    `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.

- **-Mdebug**, **-d**_x_

    Debug option is described in [App::Greple::debug](https://metacpan.org/pod/App%3A%3AGreple%3A%3Adebug) module.

# ENVIRONMENT and STARTUP FILE

- **GREPLEOPTS**



( run in 2.951 seconds using v1.01-cache-2.11-cpan-d01c6094234 )