Documentation ¶
Overview ¶
Concurrent, parallel grep.
Synopsis:
grep [-vrlq] [FILE]...
Description:
It has to deal with the EMFILE limit. To do so we have one chan that is bounded. From args, we use filepath.Walk to generate a chan of names. From that, we create a chan of grepCommands. From that, we create a chan of grepResults. The grepResults contain matches or not-matches only. If we are in -l mode, the goprocs handling the grep bail out as soon as the condition is met. This grep is about 2x faster than GNU grep for simple non-recursive greps and slower as soon as filepath. Walk enters the picture. Let's fix this.
Options:
-v: print only non-matching lines -r: recursive -l: list only files -q: don't print matches; exit on first match
Click to show internal directories.
Click to hide internal directories.