Skip to content

Commit

Permalink
[bin] bin added
Browse files Browse the repository at this point in the history
  • Loading branch information
mmalecki committed Aug 28, 2011
1 parent 2d70e8a commit bc5dcac
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions bin/ngrep
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/usr/bin/env node
var ngrep = require('../lib/ngrep');

function callback(result) {
console.log(result.context);
}

var pattern = new RegExp(process.argv[2], 'g');
var target = process.argv[3];
ngrep(pattern, target, callback);

0 comments on commit bc5dcac

Please sign in to comment.