Re: [Exim] exigrep (Exim 3.35) and gzipped logfiles

Αρχική Σελίδα
Delete this message
Reply to this message
Συντάκτης: Tabor J. Wells
Ημερομηνία:  
Προς: Bernhard R. Erdmann
Υ/ο: exim-users@exim.org
Αντικείμενο: Re: [Exim] exigrep (Exim 3.35) and gzipped logfiles
On Mon, Apr 08, 2002 at 11:33:23PM +0200,
Bernhard R. Erdmann <be@???> is thought to have said:

> Hi,
>
> today I exigrepped an already gzipped file. Later this logfile was
> gunzipped lying around.
> This is not the expected behaviour. I'd prefer if exigrep would gunzip
> it on the fly for parsing but not to modify the gzipped logfile.


exigrep is just a perl script with it's handling of compressed files based
on what you set in Local/Makefile when you built exim:

[snip]
  foreach (@ARGV)
    {
    my $filename = $_;
    if ($filename =~ /\.(?:bz2)$/)
      {
      open(LOG, "/usr/bin/bzcat $filename |") ||
        die "Unable to zcat $filename: $!\n";
      }
    else
[snip]


Which is based on my setting:

COMPRESS_COMMAND=/usr/bin/bzip2
COMPRESS_SUFFIX=bz2
ZCAT_COMMAND=/usr/bin/bzcat

in my Local/Makefile. Perhaps your ZCAT_COMMAND was set to something other
than zcat/gzcat?

Tabor

--
--------------------------------------------------------------------
Tabor J. Wells                                     twells@???
Fsck It!                 Just another victim of the ambient morality