[plug] Linux uptime

Craig czilko at southwest.com.au
Tue Feb 12 13:43:14 WST 2002


I think this is what is being chased, a small executable perl script which 
KMail runs as a signature file ...

#!/usr/bin/perl

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

# 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.";

# version string has built-in newline.
print "\Cheers,\n\tCraig.\n\nMandrake Linux 8.1\nKernel version: \ 
$version$disp\nRegistered Linux User: 228534\n \
In a world without fences - who needs Gates?";

exit(0);

Hope that helps.

-- 
Cheers,
	Craig.

Mandrake Linux 8.1
Kernel version: 2.4.8-34.1mdk
Current Linux uptime: 18 days 12 hours 14 minutes.
Registered Linux User: 228534
 
In a world without fences - who needs Gates?



More information about the plug mailing list