grep

    grep command for MoonX.

    command-line
    moonx
    wasm
    Download zip
    Author
    Version
    0.3.5
    License
    Apache-2.0
    Last updated
    8 hours ago
    Downloads
    169

    #grep

    Search files or standard input for matching records through MoonX.

    #Usage

    moonx cli/grep -n 'error' app.log moonx cli/grep -E 'warn|error' app.log moonx cli/grep -F 'literal.text' input.txt

    Use basic regular expressions by default, -E for extended expressions or -F for literals. Exit 0 for a match, 1 for no match and 2 for errors.

    #Common options

    OptionDescription
    -F, --fixed-stringsMatch literal strings.
    -E, --extended-regexpUse extended regular expressions.
    -o, --only-matchingPrint each nonempty matched part separately.
    -i, --ignore-caseIgnore ASCII case differences.
    -n, --line-numberPrint record numbers.
    -r, --recursiveRecurse without following links.
    -C VALUE, --context VALUEPrint this many records before and after a match.
    --helpShow help.
    --versionShow the version.

    Use --help for the complete option list.

    #Notes

    • Matching uses C-locale byte classes and ASCII case folding, not Unicode locale rules. Backreferences may require additional work and memory.

    See the compatibility guide for the supported profile.

    Source Files