[Linux-disciples] zcat v. zgrep v. zless
Dylan Thurston
dpt at bostoncoop.net
Mon Oct 4 12:12:40 EDT 2004
On Mon, Oct 04, 2004 at 10:39:16AM -0400, Stephen R Laniel wrote:
> If you zgrep a raw-text file, it'll work fine. If you
> zless a raw-text file, it likewise works fine. If you
> zcat a raw-text file, however, you get an error that the
> file you're trying to cat isn't gzipped.
>
> Is there a good reason for this inconsistent behavior?
Unlikely. I'd file a wishlist bug against the gzip package, and the
bzip2 package if it does the same thing.
> What's the best way around this? I suppose I could write a
> script that checks whether its argument is gzipped or
> raw text; if the former, the script would run zcat against
> it, whereas for the latter the script would just run 'cat'.
> But that seems like a suboptimal approach.
Why suboptimal? Speed will not be a concern.
Peace,
Dylan
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://lists.bostoncoop.net/pipermail/linux-disciples/attachments/20041004/339bf8cd/attachment.pgp
More information about the Linux-disciples
mailing list