[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [cobalt-users] OT: Showing uptime via web
- Subject: Re: [cobalt-users] OT: Showing uptime via web
- From: "Steven Werby" <steven-lists@xxxxxxxxxxxx>
- Date: Mon Aug 21 20:34:21 2000
Cody Watkins <codyw@xxxxxxxxxxxxxxxxx> wrote:
> I want to show the number of days my RaQ3 has been up for in a Perl Cgi
> script. I found a script to call the following up:
>
> 6:58pm up 43 days, 3:38, 1 user, load average: 0.05, 0.05, 0.05
>
> Does anybody know how I can cut everything but the number of days out via a
> command I can put in the script?
Since the output of 'uptime' is going to always be of the same format you can
use regular expressions to pull out what you need.
--
Steven Werby {steven-lists@xxxxxxxxxxxx}