Hi,

But it is not actually comparing the exact headers as mentioned in earlier posting. It is just printing the Object Identifiers after addition in a Random Manner. Here the matched header in both Files(i.e. Records1 and Records2) is |8.2.0.4352.1.1|8.2.0.4352.1.1|0x3|14|6|3|97.232.1.2|6. After comparing the Files and getting this Header as the matched one, only the object identifiers of this header need to be added and printed in the output File.

1) The data in Records1 is :-

#LOGNUM|1|OPERATIONAL

|O%:CCLN-1-CBS1

|8.2.0.4352.1.1|8.2.0.4352.1.1|0x3|10|2|105

|36242050|58

|5|1|6

|5|2|0

|5|3|0

|5|4|6

|5|5|0

|5|6|0

|38929186|58

|5|1|5

|5|2|0

|5|3|0

|5|4|5

|5|5|0

|5|6|0

|33554850|58

|5|1|184

|5|2|0

|5|3|16

|5|4|184

|5|5|0

|5|6|0

#END

#LOGNUM|1|OPERATIONAL

|O%:CCLN-1-CBS1

|8.2.0.4352.1.1|8.2.0.4352.1.1|0x3|11|2|238

|36241618|40

|7|1|1486

|7|2|0

|7|3|0

|7|4|0

|7|5|0

|7|6|5315

|36241858|40

|7|1|2996

|7|2|0

|7|3|0

|7|4|0

|7|5|0

|7|6|8880

|38929106|40

|7|1|16862

|7|2|133

|7|3|0

|7|4|42

|7|5|0

|7|6|75938

#END

#LOGNUM|1|OPERATIONAL

|O%:CCLN-1-CBS1

|8.2.0.4352.1.1|8.2.0.4352.1.1|0x3|14|6|3

|97.232.1.2|6

|7|1|1553

|7|2|13

|7|3|1870

|5|4|0

|7|5|22087238

|7|6|73162814

|97.232.1.4|6

|7|1|1877

|7|2|14

|7|3|2200

|5|4|0

|7|5|185424

|7|6|1530455

|97.232.1.3|6

|7|1|1898

|7|2|12

|7|3|2210

|5|4|0

|7|5|1280410

|7|6|6526620

#END

2) The data in Records2 is :-

#LOGNUM|1|OPERATIONAL

|O%:CCLN-1-CBS1

|8.2.0.4352.1.1|8.2.0.4352.1.1|0x3|10|2|141

|33554850|58

|5|1|66

|5|2|0

|5|3|0

|5|4|66

|5|5|0

|5|6|0

|38928802|58

|5|1|181

|5|2|0

|5|3|0

|5|4|181

|5|5|0

|5|6|0

|36241938|58

|5|1|10

|5|2|0

|5|3|0

|5|4|10

|5|5|0

|5|6|0

#END

#LOGNUM|1|OPERATIONAL

|O%:CCLN-1-CBS1

|8.2.0.4352.1.1|8.2.0.4352.1.1|0x3|11|2|250

|38928802|40

|7|1|67926

|7|2|4989

|7|3|4542

|7|4|12414

|7|5|9955

|7|6|800193

|36241554|40

|7|1|88640

|7|2|3661

|7|3|7150

|7|4|7546

|7|5|8717

|7|6|882378

|36241842|40

|7|1|1055

|7|2|0

|7|3|0

|7|4|0

|7|5|0

|7|6|5009

#END

#LOGNUM|1|OPERATIONAL

|O%:CCLN-1-CBS1

|8.2.0.4352.1.1|8.2.0.4352.1.1|0x3|14|6|3

|97.232.1.2|6

|7|1|1545

|7|2|14

|7|3|1981

|5|4|0

|7|5|18613745

|7|6|81837527

|97.232.1.4|6

|7|1|1931

|7|2|9

|7|3|2367

|5|4|0

|7|5|4326223

|7|6|19359092

|97.232.1.3|6

|7|1|1889

|7|2|13

|7|3|2322

|5|4|0

|7|5|6642322

|7|6|30404562

#END

Can you please give your inputs...

Thanks,

K.


In reply to Re^7: Adding object identifiers corresponding to each IP and printing them to O/P File. by Kiran Kumar K V N
in thread Adding object identifiers corresponding to each IP and printing them to O/P File. by Kiran Kumar K V N

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.