grepish
A text-search utility like grep, with a focus on ease of use.
Last updated 3 years ago by josephuspaye .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install grepish 
SYNC missed versions from official npm registry.

grepish

A text-search utility like grep, with a focus on ease of use. Useful for working with text on the command line.

Installation

npm install -g grepish

Usage

Usage:
    cat input.txt | grepish [command] [modifier] (text|<pattern>...)
    grepish (--help|--version)

Commands:
    filter          Find and print lines in the input which match the given pattern.
    count           Count the number of lines in the input which match the given pattern.

Modifiers:
    -d <d>, --delimiter <d>     Use <d> as the delimiter for splitting lines. Defaults to the OS's end of line character.
    -x, --exclude               Use exclude mode. Will count or print lines not matching the given pattern.
    -m, --match-case            Use case-sensitive search.

Patterns:
    -s <p>, --starts <p>        Match lines that start with <p>.
    -c <p>, --contains <p>      Match lines that contain <p> anywhere in the line.
    -e <p>, --ends <p>          Match lines that end with <p>.
    -r <p>, --regexp <p>        Use <p> as a JavaScript regular expression to match lines. Do not include delimiters or flags.

License

MIT

Current Tags

  • 0.1.2                                ...           latest (3 years ago)

3 Versions

  • 0.1.2                                ...           3 years ago
  • 0.1.1                                ...           3 years ago
  • 0.1.0                                ...           3 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 2
Last Day 0
Last Week 0
Last Month 5
Dependencies (4)
Dev Dependencies (0)
None
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |