grepy
Wrapper around command line grep with JSON output
Install
npm install --save grepy
Usage
Callback
Stream
grepy
emits one parsed line at a time, so it is possible to process data "on the fly" without buffering. Thanks to streams here.
grepy
Output format
filename: <filename> lineNumber: <line number> chunks: str: <substring> matched <true | false> str: <substring> matched <true | false> ... filename: <filename> lineNumber: <line number> chunks: str: <substring> matched <true | false> str: <substring> matched <true | false> ... ...
Examples
For more examples take a look at test/test.js
var grepy = var args = grepydefaultArgsvar log = consolelog
// npm install grepy request concat-stream var grepy = var request = var args = grepydefaultArgsvar log = consolelogvar concat = var pattern = "<dd class='value m_temp c'>\\K[^<]+"var match = grepy