[Gllug] Combining CAT and ZCAT in one line

Andrew Black andrew-li at black1.org.uk
Tue Jul 10 10:18:23 UTC 2007


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 ?
-- 
Gllug mailing list  -  Gllug at gllug.org.uk
http://lists.gllug.org.uk/mailman/listinfo/gllug




More information about the GLLUG mailing list