grep

command
v0.0.0-...-c4da75d Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 4, 2017 License: BSD-3-Clause Imports: 6 Imported by: 0

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL