Any fancy grep utility replacements out there?

George Sakkis george.sakkis at gmail.com
Tue Mar 18 00:31:42 EDT 2008


On Mar 17, 10:20 pm, "samsli... at gmail.com" <samsli... at gmail.com>
wrote:

> So I need to recursively grep a bunch of gzipped files.  This can't be
> easily done with grep, rgrep or zgrep.  (I'm sure given the right
> pipeline including using the find command it could be done....but
> seems like a hassle).

If it's for something quick & dirty, you can't beat the pipeline, e.g.
something like:

find some_dir -name "*gz"  | xargs -i sh -c "echo '== {} =='; zcat {}
| grep some_pattern"

George



More information about the Python-list mailing list