Network Automation Software We are currently migrating this forum
over to our HelpSystems domain. Please
post all new threads in our new
HelpSystems Community Portal.
Post to the HelpSystems Forum
You are not currently logged on. You must be logged on in order to post. Log on
Or Create a new account
AutoMate Discussion
Decrease font size
Increase font size
Topic Title: How to read particular line from text file
Topic Summary: Hi,I have text file i need to read some lines in the middle of the text file i dont know how to do this plese help me.
Created On: 01/23/2014 07:58 AM
Status: Read Only
Linear : Threading : Single : Branch
Search Topic Search Topic
Topic Tools Topic Tools
View similar topics View similar topics
View topic in raw text format. Print this topic.
 01/23/2014 07:58 AM
User is offline View Users Profile Print this message

Author Icon
AnanthanRamalingam
Apprentice (20-49)

Posts: 26
Joined: 01/23/2014

Hi,

I have text file i need to read some lines in the middle of the text file i dont know how to do this plese help me.

I have attached my text file here.

Report Date: 12/31/2013 10:22:38 AM
Sequence Type: Numeric Book and Page
Index Assignment Pattern: Index Per Frame
DSM: DSM_01_QA
County: FLDIXI
Auto Ranges: True
Start Index: 139
End Index: 459

 

Metrics In Independent Sequence (Book)
--------------------------------------
Percent Missing:                              0.00 %
Percent Not Missing:                        100.00 %
Total Missing:                                0
Total Not Missing:                          321
Total Gaps:                                   0
Average Gap Size:                             0
Maximum Gap Size:                             0
Total Overlaps:                               0
Average Overlap Size:                         0
Maximum Overlap Size:                         0
Start of Sequence:                          139
End of Sequence:                            459

 


Metrics Across Dependent Sequence (Page)
----------------------------------------
Percent Missing:                             25.41 %
Percent Not Missing:                         74.59 %
Number of Missing Ranges:                 6,750
Number of Missing Documents:             67,742
Number of Overlap Ranges:                   301
Number of Overlap Documents:                417

 

Gaps in Independent Sequence (Book)
-----------------------------------

 


Gaps in Dependent Sequence (Page)
---------------------------------

139
---
Percent Missing:                     45.45 %
Percent Not Missing:                 54.55 %
Total Missing:                      515
Total Not Missing:                  618
Total Gaps:                          37
Average Gap Size:                    13
Maximum Gap Size:                   332
Total Overlaps:                       0
Average Overlap Size:                 0
Maximum Overlap Size:                 0
Start of Sequence:                    1
End of Sequence:                  1,133

                Book    Start             End         Count
                ----    -----             ---         -----
Gap:             139    3               - 4               2
Gap:             139    6               - 12              7
Gap:             139    15              - 18              4
Gap:             139    38              - 49             12
Gap:             139    97              - 100             4
Gap:             139    103             - 104             2
Gap:             139    113             - 114             2
Gap:             139    128             - 130             3
Gap:             139    133             - 137             5
Gap:             139    149             - 152             4
Gap:             139    184             - 186             3
Gap:             139    195             - 199             5
Gap:             139    205             - 209             5
Gap:             139    211             - 217             7
Gap:             139    229             - 237             9
Gap:             139    239             - 255            17
Gap:             139    284             - 289             6
Gap:             139    310             - 311             2
Gap:             139    327             - 334             8
Gap:             139    362             - 366             5
Gap:             139    380             - 381             2
Gap:             139    399             - 402             4
Gap:             139    441             - 447             7
Gap:             139    454             - 463            10
Gap:             139    475             - 476             2
Gap:             139    497             - 499             3
Gap:             139    525             - 527             3
Gap:             139    597             - 599             3
Gap:             139    610             - 615             6
Gap:             139    618             - 621             4
Gap:             139    655             - 657             3
Gap:             139    668             - 675             8
Gap:             139    716             - 719             4
Gap:             139    727             - 735             9
Gap:             139    773             - 774             2
Gap:             139    788             - 788             1
Gap:             139    801             - 1132          332

 

140
---
Percent Missing:                     16.94 %
Percent Not Missing:                 83.06 %
Total Missing:                      135
Total Not Missing:                  662
Total Gaps:                          23
Average Gap Size:                     5
Maximum Gap Size:                    20
Total Overlaps:                       3
Average Overlap Size:                 2
Maximum Overlap Size:                 4
Start of Sequence:                    1
End of Sequence:                    797

                Book    Start             End         Count
                ----    -----             ---         -----
Gap:             140    16              - 21              6
Gap:             140    29              - 31              3
Gap:             140    33              - 40              8
Gap:             140    47              - 49              3
Gap:             140    57              - 65              9
Gap:             140    96              - 100             5
Gap:             140    126             - 129             4
Overlap:         140    136             - 137             2
Gap:             140    144             - 146             3
Gap:             140    161             - 162             2
Gap:             140    172             - 173             2
Gap:             140    185             - 187             3
Gap:             140    215             - 217             3
Gap:             140    251             - 255             5
Gap:             140    311             - 318             8
Gap:             140    338             - 339             2
Gap:             140    348             - 367            20
Gap:             140    470             - 474             5
Gap:             140    512             - 527            16
Gap:             140    545             - 552             8
Gap:             140    561             - 562             2
Overlap:         140    570             - 573             4
Gap:             140    620             - 621             2
Gap:             140    666             - 669             4
Overlap:         140    745             - 746             2
Gap:             140    770             - 781            12

 

 

 



 Category Survey
 01/23/2014 08:02 AM
User is offline View Users Profile Print this message

Author Icon
AnanthanRamalingam
Apprentice (20-49)

Posts: 26
Joined: 01/23/2014

It should read only Book,Start,End from below things from text file.

 

               Book    Start             End         Count
                ----    -----             ---         -----
Gap:             140    16              - 21              6
Gap:             140    29              - 31              3
Gap:             140    33              - 40              8
Gap:             140    47              - 49              3
Gap:             140    57              - 65              9
Gap:             140    96              - 100             5
Gap:             140    126             - 129             4
Overlap:         140    136             - 137             2
Gap:             140    144             - 146             3
Gap:             140    161             - 162             2
Gap:             140    172             - 173             2
Gap:             140    185             - 187             3
Gap:             140    215             - 217             3
Gap:             140    251             - 255             5
Gap:             140    311             - 318             8
Gap:             140    338             - 339             2
Gap:             140    348             - 367            20
Gap:             140    470             - 474             5
Gap:             140    512             - 527            16
Gap:             140    545             - 552             8
Gap:             140    561             - 562             2
Overlap:         140    570             - 573             4
Gap:             140    620             - 621             2
Gap:             140    666             - 669             4
Overlap:         140    745             - 746             2
Gap:             140    770             - 781            12



 Category Survey
 01/23/2014 09:04 AM
User is offline View Users Profile Print this message

Author Icon
JeanDelfosse
Supreme Guru (1000+)

Posts: 8883
Joined: 03/30/2005

Ananthan,
there is no good solution for that with AM6, because AM6 regular expression engine is very poor.
But some basic workaround could help as shown in the sample below

 Category Survey
AutoMate 6 version:
Windows version:



Task Steps: (Right click, Select All, Copy to copy to the clipboard. Steps can then be pasted into the AutoMate Task Builder)


-------------------------
Jean Delfosse - Automate Beta Tester
Win7 Pro 64 bits -Win XP Pro SP3 32 bits - AM8, AM7, BPA10, BPA9, BPA8, BPA7, AM6 Enterprise, AM4
 01/23/2014 09:08 AM
User is offline View Users Profile Print this message

Author Icon
AnanthanRamalingam
Apprentice (20-49)

Posts: 26
Joined: 01/23/2014

Hi JeanDelfosse,

Thanks for your reply But i am using Automate BPA Server 9.I have posted under Automate BPA Server 9 also

 



 Category Survey
Statistics
18258 users are registered to the AutoMate Discussion forum.
There are currently 0 users logged in.
The most users ever online was 6686 on 11/01/2020 at 01:24 AM.
There are currently 2400 guests browsing this forum, which makes a total of 2400 users using this forum.

FuseTalk Enterprise Edition v4.0 - © 1999-2020 FuseTalk Inc. All rights reserved.

Sitemap Network Automation Software Blog