Sat, 04 Apr 2009 22:40:04 +0200
Correct DOS carriage returns at line endings to line feeds only.
michael@136 | 1 | #!@l_prefix@/bin/perl |
michael@136 | 2 | ## |
michael@136 | 3 | ## uptime.pl: provide formatted uptime(1) information |
michael@136 | 4 | ## |
michael@136 | 5 | |
michael@136 | 6 | $ZERO = 0; |
michael@136 | 7 | $uptime = `uptime`; |
michael@136 | 8 | |
michael@136 | 9 | $uptime =~ /up (.*?) day/; |
michael@136 | 10 | $up = int($1); |
michael@136 | 11 | $hostname = `hostname`; |
michael@136 | 12 | |
michael@136 | 13 | print "$ZERO\n$up\n" |
michael@136 | 14 |