mrtg/uptime.pl

Sat, 04 Apr 2009 22:40:04 +0200

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Sat, 04 Apr 2009 22:40:04 +0200
changeset 136
ca197d884ebd
parent 135
cd68ee26852b
child 138
3603322c3b20
permissions
-rw-r--r--

Correct DOS carriage returns at line endings to line feeds only.

     1 #!@l_prefix@/bin/perl
     2 ##
     3 ##  uptime.pl: provide formatted uptime(1) information
     4 ##
     6 $ZERO = 0;
     7 $uptime = `uptime`;
     9 $uptime =~ /up (.*?) day/;
    10 $up = int($1);
    11 $hostname = `hostname`;
    13 print "$ZERO\n$up\n"

mercurial