grep

command
v6.0.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Aug 14, 2019 License: BSD-3-Clause Imports: 8 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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