Instead of running grep foo * | grep bar
you can run double_grep foo bar
For example, imagine you have a log file and you need to find the
word “foo” but you only want the occurrances that are on lines
starting with “ERROR”: double_grep "^ERROR" foo
USAGE: double_grep first_grep second_grep [file]
* first_grep used to find files
* second_grep is what you want to find IN those files
* file is any file path/wildcard that grep would accept
to limit where it looks.
Note: dgrep stands for "double grep"
Metadata:
Tags: