GNU bug report logs - #42402
Enhancement request re zcat with empty files

Previous Next

Package: gzip;

Reported by: Peter Horn <peter.horn <at> bigpond.com>

Date: Fri, 17 Jul 2020 04:37:02 UTC

Severity: wishlist

Done: Paul Eggert <eggert <at> cs.ucla.edu>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Bob Proulx <bob <at> proulx.com>
To: Peter Horn <peter.horn <at> bigpond.com>
Cc: 42402 <at> debbugs.gnu.org
Subject: bug#42402: Enhancement request re zcat with empty files
Date: Fri, 17 Jul 2020 23:45:22 -0600
Peter Horn wrote:
> But, wanting to further process a number of entries, I tried the obvious
> zcat xyz* | awk ...
> which results in
> gzip: xyz.log.1: unexpected end of file

To perhaps help work around the issue you have raised I'll just
suggest that 'zmore' and 'zless' can be (ab)used in this case.  They
are both the same.  And also though you mentioned 'zgrep' it can also
be used early in the pipeline.  Try it this way.

  zmore xyz.log* | awk ...
  zless xyz.log* | awk ...
  zgrep whatever xyz.log* | awk ...

It's somewhat backing into the solution but perhaps useful for you in
the toolbox regardless.

Bob




This bug report was last modified 3 years and 96 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.