[exim] shouldn't exigrep sort the grepped file(names) by dat…

Etusivu
Poista viesti
Vastaa
Lähettäjä: Heiko Schlittermann
Päiväys:  
Vastaanottaja: exim-users@exim.org
Aihe: [exim] shouldn't exigrep sort the grepped file(names) by date?
Hello,

I think, exigrep should sort it's output by the time of the records
(time completed? time first notice?)… While thinking about this I've
added just a small change to have exigrep at least sort the filenames
by the modification dates of the files.

--- /usr/sbin/exigrep   2008-09-30 20:57:42.000000000 +0200
+++ /tmp/exigrep        2010-06-09 00:02:04.000000000 +0200
@@ -147,7 +147,7 @@


 if (@ARGV)
   {
-  foreach (@ARGV)
+  foreach (sort { -M $b <=> -M $a } @ARGV)
     {
     my $filename = $_;
     if ($filename =~ /\.(?:gz)$/o)



If there are no objections I'd like to ask having this change in one of
the next exim releases.

(I know, I could have sorted the files on the command line already…)

Thank you.

    Best regards from Dresden/Germany
    Viele Grüße aus Dresden
    Heiko Schlittermann
-- 
 SCHLITTERMANN.de ---------------------------- internet & unix support -
 Heiko Schlittermann HS12-RIPE -----------------------------------------
 gnupg encrypted messages are welcome - key ID: 48D0359B ---------------
 gnupg fingerprint: 3061 CFBF 2D88 F034 E8D2  7E92 EE4E AC98 48D0 359B -