[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#42402: Enhancement request re zcat with empty files
From: |
Bob Proulx |
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