B
Ben Samuals
I need to pull a couple of lines from the following text (it is actually in
a file, that is ouput from uptime.exe). I need the line beginning with
"Uptime Report for:" then the line listing Current system uptime. Also, I
can use for with "delims=:, " but how do I get both lines in the output?
\\server1
Current System Uptime: 89 day(s), 1 hour(s), 46 minute(s), 23 second(s)
\\server2
Current System Uptime: 89 day(s), 1 hour(s), 46 minute(s), 23 second(s)
\\server3
Current System Uptime: 89 day(s), 1 hour(s), 46 minute(s), 23 second(s)
\\server4
Current System Uptime: 89 day(s), 1 hour(s), 46 minute(s), 23 second(s).....
This is the output from the uptime.ext (contained in a file) OUTPUT below:
Uptime Report for: \\server1
Current OS: Microsoft Windows 2000, Service Pack 4, Multiprocessor Free.
Time Zone: Eastern Standard Time
System Events as of 2/12/2004 1:28:35 PM:
Date: Time: Event: Comment:
---------- ----------- -------------------
-----------------------------------
Current System Uptime: 89 day(s), 1 hour(s), 46 minute(s), 23 second(s)
------------------------------------------------------------------------
--------
Since 1/1/2004: (Last 42 Days)
System Availability: 100.0000%
Total Uptime: 42d 13h:28m:35s
Total Downtime: 0d 0h:0m:0s
Total Reboots: 0
Total Bluescreens: 0
Notes:
The remote system may be a member of a cluster.
If the remote system is a member of a cluster the reported availability
information applies only to the currently active node, NOT to the
cluster
as a whole.
Uptime Report for: \\server2
Current OS: Microsoft Windows 2000, Service Pack 4, Uniprocessor Free.
Time Zone: Eastern Standard Time
System Events as of 2/12/2004 1:28:43 PM:
Date: Time: Event: Comment:
---------- ----------- -------------------
a file, that is ouput from uptime.exe). I need the line beginning with
"Uptime Report for:" then the line listing Current system uptime. Also, I
can use for with "delims=:, " but how do I get both lines in the output?
\\server1
Current System Uptime: 89 day(s), 1 hour(s), 46 minute(s), 23 second(s)
\\server2
Current System Uptime: 89 day(s), 1 hour(s), 46 minute(s), 23 second(s)
\\server3
Current System Uptime: 89 day(s), 1 hour(s), 46 minute(s), 23 second(s)
\\server4
Current System Uptime: 89 day(s), 1 hour(s), 46 minute(s), 23 second(s).....
This is the output from the uptime.ext (contained in a file) OUTPUT below:
Uptime Report for: \\server1
Current OS: Microsoft Windows 2000, Service Pack 4, Multiprocessor Free.
Time Zone: Eastern Standard Time
System Events as of 2/12/2004 1:28:35 PM:
Date: Time: Event: Comment:
---------- ----------- -------------------
-----------------------------------
Current System Uptime: 89 day(s), 1 hour(s), 46 minute(s), 23 second(s)
------------------------------------------------------------------------
--------
Since 1/1/2004: (Last 42 Days)
System Availability: 100.0000%
Total Uptime: 42d 13h:28m:35s
Total Downtime: 0d 0h:0m:0s
Total Reboots: 0
Total Bluescreens: 0
Notes:
The remote system may be a member of a cluster.
If the remote system is a member of a cluster the reported availability
information applies only to the currently active node, NOT to the
cluster
as a whole.
Uptime Report for: \\server2
Current OS: Microsoft Windows 2000, Service Pack 4, Uniprocessor Free.
Time Zone: Eastern Standard Time
System Events as of 2/12/2004 1:28:43 PM:
Date: Time: Event: Comment:
---------- ----------- -------------------