bug-gnu-utils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: grep - enhancement request


From: Alain Magloire
Subject: Re: grep - enhancement request
Date: Wed, 15 Aug 2001 20:52:52 -0400 (EDT)

Bonjour

> It would be a Good Thing, I think, if grep could recognise and scan the 
> contents of files compressed with gzip and bzip2. Ideally it would do 
> it without being told - it might be asked to search any mix of files.
> 
> Even better would be processing contents of tarballs (and ZIP archives) 
> as if they were directories.
> 
> If you think it desirable to tell grep to uncompress compress files, 
> then let the options --gzip --bzip2 or --decompress or whatever enable 
> the feature to detect which files are compressed with bzip2, gzip or 
> not compressed, not to mean that all files are to be decompressed. That 
> is, decompress files that seem to be compressed, untar files that seem 
> to be tarballs, unzip apparent zip archives.

It is probably not desirable to put those features in grep.
It will bloat the code and all you need to do is "pipe" the file to grep.

It can easily be done by some smart shell script around grep
basically doing 'zcat' or 'gzip -dc'.

I do beleive there are shell scripts floating on the web doing exactly
what you propose, some GNU/Linux distributions have something call
"zgrep" and "zipgrep", simple shell scripts.

In brief, I do not see the gain.

--
alain




reply via email to

[Prev in Thread] Current Thread [Next in Thread]