[Gllug] Combining CAT and ZCAT in one line
Fred Youhanaie
fly at anydata.co.uk
Tue Jul 10 10:22:10 UTC 2007
Andrew Black wrote:
> I have a number of logs, some of which have been compressed
> mainlog mainlog.1 mainlog.2.gz mainlog.3.gz
>
> I can do
> cat mainlog | grep oojimaflip
> zcat mainlog.*.qz | grep oojimaflip
>
> Is there are way I can do both in the same line - decompress files that
> need it on the fly ?
(cat ... ; zcat ...) | grep ...
Cheers
f.
--
Gllug mailing list - Gllug at gllug.org.uk
http://lists.gllug.org.uk/mailman/listinfo/gllug
More information about the GLLUG
mailing list