Package Exports
- jsgrep-cli
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (jsgrep-cli) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
jsgrep-cli
An alternative to grep which uses JavaScript's Regex, supports a match and a match-and-replace
Installation
npm i jsgrep-cli -g
Example
Match input from stdin, return any matching line:
ls -al ~ | jsgrep " \.[a-z]+rc$"
Match and replace lines from stdin. Capturing groups are exposed as $1
, $2
... variables (1-indexed), and must probably be escaped to prevent being interpreted by your shell:
ls -al ~ | jsgrep ".+ (\.[a-z]+rc$)" "\$1"
Passing flags (default i
):
ls -al ~ | jsgrep " \.[a-z]+rc$" --flags iu