On Sun Nov 12, 2000 at 06:42:13PM +0100, Alexander Skwar wrote:

> > We no longer use "non-dotted" revision numbers for updates.  They will
> > always be "x.xmdk" so that they will always be lower than cooker.
> 
> Ah, no I understand.  Thanks you, Vincent, for explaining.

No problem.

> > Current Linux uptime: 4 days 11 hours 36 minutes.
> 
> BTW: How do you append a string to your signature dynamically?  I also want
> to do this :]  But apart from the header I haven't found a way to do it. 
> Oh, yes, I'm also using mutt.  mutt kicks all the gui clients *G*

While Chmouel will insist emacs rules (it's pretty good but I'm still
pretty clumsy with it), I must say that mutt rules... =)  All you do
is write your perl script or whatever you want to do and tell mutt to
execute it instead of read in a file like this:

set signature='~/bin/uptime.pl ~/.signature|'

My ~/bin/uptime.pl is this:

#!/usr/bin/perl

$home =  $ENV{"HOME"};

# get current uptime
$uptime = `linux_logo -g -a -F "#U"`;
@uptime = split(/Uptime /,$uptime);
@disp   = split(/minute/,$uptime[1]);
$disp   = "Current Linux uptime: $disp[0]minutes.";

if ($#ARGV lt 0 or $#ARGV gt 1) {
  print "Usage: $^X sigfile\n";
  exit(1);
}

open (SIG, "$ARGV[0]") or die "Can't open $ARGV[0]";
while (<SIG>) {
  $sig .= $_;
}

print "$sig\n\n$disp\n";

#open (SIG,">$home/.sig");
#print SIG "-- \n$sig\n\n$disp";
#close SIG;

exit(0);

Crude, but it works.  And it's accurate up to the minute.  For those
who don't use mutt and want to use the same script (I'll mention this
now since I'm asked at least once a week about it), just uncomment the
last three lines and run the script as a cronjob every minute or so.
Then use ~/.sig as your signature file.

Voila!  =)

-- 
[EMAIL PROTECTED], OpenPGP key available on www.keyserver.net
1024D/FE6F2AFD   88D8 0D23 8D4B 3407 5BD7  66F9 2043 D0E5 FE6F 2AFD
 - Danen Consulting Services    www.danen.net, www.freezer-burn.org
 - MandrakeSoft, Inc.           www.linux-mandrake.com

Current Linux uptime: 5 days 17 hours 52 minutes.

Reply via email to