Page 1 of 1 1
Topic Options
#127920 - 2004-10-14 03:46 PM how to read many lines
jan Offline
Getting the hang of it

Registered: 2004-07-07
Posts: 66
Hi

I've an output file which contains:
Get Connection License Capabilities:

License Set: Connection Upgrade
License Set ID: 0x00000000000186fd
Status: Activated
Count: 395
Pooled In Use: 0
Pooled Available: 395
Number Assigned: 0
Assigned In Use: 0
Available For Assignment: 395

License Set: MetaFrame Connection
License Set ID: 0x0000000000000003
Status: Activated
Count: 403
Pooled In Use: 190
Pooled Available: 213
Number Assigned: 0
Assigned In Use: 0
Available For Assignment: 403

License Set: MetaFrame XP 1.0, Feature Release 2 Connection
License Set ID: 0x0000000000018711
Status: Activated
Count: 395
Pooled In Use: 0
Pooled Available: 395
Number Assigned: 0
Assigned In Use: 0
Available For Assignment: 395

Completed successfully.


The info I need to put into a log-file is:
License Set ID: 0x0000000000000003
Status: Activated
Count: 403
Pooled In Use: 190
Pooled Available: 213

How do I get that?

Jan

Top
#127921 - 2004-10-14 03:55 PM Re: how to read many lines
Howard Bullock Offline
KiX Supporter
*****

Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
Without coding for you, I would suggest:


Code:

Open(filename)
$line = Readline(...)


while each $line
select
case left($line, 15) = "License Set ID:"
write $line to new file
case left($line, 7) = "Status:"
write $line to new file
endselect


_________________________
Home page: http://www.kixhelp.com/hb/

Top
#127922 - 2004-10-14 03:57 PM Re: how to read many lines
jan Offline
Getting the hang of it

Registered: 2004-07-07
Posts: 66
Thats all I need (I'll hope)

Thanks alot

Top
#127923 - 2004-10-16 03:00 PM Re: how to read many lines
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11165
Loc: Boston, MA, USA
The UDF Forum contains a plethora of file-reading UDFs that would be suitable for your needs.
_________________________
There are two types of vessels, submarines and targets.

Top
#127924 - 2004-10-16 10:58 PM Re: how to read many lines
Radimus Moderator Offline
Moderator
*****

Registered: 2000-01-06
Posts: 5187
Loc: Tampa, FL
see readfile() UDF
_________________________
How to ask questions the smart way <-----------> Before you ask

Top
Page 1 of 1 1


Moderator:  Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart 
Hop to:
Shout Box

Who's Online
0 registered and 1045 anonymous users online.
Newest Members
ManuvdWielNL, Sir_Barrington, batdk82, StuTheCoder, M_Moore
17887 Registered Users

Generated in 0.056 seconds in which 0.024 seconds were spent on a total of 12 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org