[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: Cody Watkins <codyw@xxxxxxxxxxxxxxxxx>
- Date: Mon Aug 21 21:07:36 2000
That worked!
Thanks!
Cody Watkins
________________________________________________
Paradox Web Hosting
codyw@xxxxxxxxxxxxxxxxxxxxx
www.paradoxwebhosting.com
At 11:51 PM 8/21/00 -0400, you wrote:
>> 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}
>>
>
>Yep -- here's a quick example:
>
>@_=split(" ",$uptime); # split the uptime on spaces
>$updays=@_[2]; # The day data will always be in the same place in your
>array.
>
>Hope that helps....
>
>Kyle Scholz
>
>
>_______________________________________________
>cobalt-users mailing list
>cobalt-users@xxxxxxxxxxxxxxx
>To Subscribe or Unsubscribe, please go to:
>http://list.cobalt.com/mailman/listinfo/cobalt-users
>