Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Capture

Status
Not open for further replies.

SStieferman

Technical User
Sep 23, 2005
57
US
Looking for some help capturing data. At the bottom is a sample report from a Nortel switch that contains multiple entries. There is more in the report, I have just cut some of the misc stuff out.

Since I have different revs of Nortels, I cannot gurantee that the entries will always be on the same row number. How can I "capture" only the Row "TNS" or "ANALOGUE TELEPHONES" for example?

>LD 22
PT2000

REQ SLT
TNS 200 LEFT 115 USED 85
ACDN 300 LEFT 293 USED 7
MUS CON 100 LEFT 36 USED 64
ANALOGUE TELEPHONES 2500 LEFT 2488 USED 12
DIGITAL TELEPHONES 2500 LEFT 2465 USED 35
TRADITIONAL TRUNKS 2500 LEFT 2471 USED 29
 
Probably the easiest way is to capture the entire data dump, then open the capture file using fopen, read each line, then use two strfind commands. One will search for TNS and the other for ANALOGUE TELEPHONES. After you have identified the lines you are interested in, you could place each of those lines (assuming you would expect just one line for each search term) in a unique variable, then either process that variable for the information you need or write that data to a different text file.

 
i use a simple capture on capture off them pull all the switches up in crystal reports...

john poole
bellsouth business
columbia,sc
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top