Re: attached messages

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





Mark Haney wrote:

  13:24:00  up 1 day, 14:31,  5 users,  load average: 0.00, 0.06, 0.09
      One billion seconds ago it was 10:37:20 CST Tue 12/05/72



Okay, how do you do that?  I mean get your systems stats in your tagline?
I've always wanted to do that.


You can use this little perl script (most of which I found elsewhere on the 'net). I've got another one with your local weather if you want also. Depending on what you use for your email client, it's (typically) a simple matter to make your signature file be output from a script in the preferences. I haven't figured out how to do it with Mozilla mail, though. One caveat: if the uptime is less than 24 hours, it won't display correctly, but I'll leave it for you to fix ;-) Be sure to make it executable.


Have fun with it,
Clint


#!/usr/bin/perl

# get current kernel version
$version = `uname -ro`;

# get current uptime
@uptime = split /\s+/, qx(uptime);
($hours, $minutes) = split /[:,]/, $uptime[5];
$disp = "Uptime: " . $uptime[3] . " days " . $hours . " hours and ".
$minutes . " minutes.";

# version string has built-in newline.
print "   ~\n";
print "  . .     Fred Flintstone   <fflintstone\@bedrock.com>\n";
print "  /V\\    \n";
print " // \\\\   Kernel: $version";
print "/(   )\\  $disp\n";
print " ^`~'^\n";

exit(0);




[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux