Just another Perl shrine | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
Hi All, I) In the File Test, we have the following with the IP 8.2.0.4352.1.1 as one of the data component in each of the following 3 complete headers:- 1) |8.2.0.4352.1.1|8.2.0.4352.1.1|0x3|10|2|105|36242050|58 2) |8.2.0.4352.1.1|8.2.0.4352.1.1|0x3|11|2|238|36241618|40 3) |8.2.0.4352.1.1|8.2.0.4352.1.1|0x3|14|6|3|97.232.1.2|6 II) In the File Test1, we have the following with the same IP i.e. 8.2.0.4352.1.1 as one of the data component in each of the following 3 complete headers:- 1) |8.2.0.4352.1.1|8.2.0.4352.1.1|0x3|10|2|141|33554850|58 2) |8.2.0.4352.1.1|8.2.0.4352.1.1|0x3|11|2|250|38928802|40 3) |8.2.0.4352.1.1|8.2.0.4352.1.1|0x3|14|6|3|97.232.1.2|6 i) Now the first purpose is to compare both the Files for matched headers. When we compare both the Files, we see that only the header |8.2.0.4352.1.1|8.2.0.4352.1.1|0x3|14|6|3|97.232.1.2|6, matches completely or is common in both the Files. The above matched header i.e.|8.2.0.4352.1.1|8.2.0.4352.1.1|0x3|14|6|3|97.232.1.2|6,in the first File i.e. Test, has the following 6 objects(may be n objects also) :- |7|1|1553 |7|2|13 |7|3|1870 |5|4|0 |7|5|22087238 |7|6|73162814 Similarly in second File i.e. Test1, the same header has the following 6 objects (may be n objects also) :- |7|1|1545 |7|2|14 |7|3|1981 |5|4|0 |7|5|18613745 |7|6|81837527 ii) Now the second purpose is to add the identifiers of objects (ignoring the 1st and 2nd place identifiers which are always common and adding only the identifiers at the 3rd place), corresponding to each IP like the following:- |7|1|1553 + |7|1|1545 = |7|1|3098 |7|2|13 + |7|2|14 = |7|2|27 |7|3|1870 + |7|3|1981 = |7|3|3851 |5|4|0 + |5|4|0 = |5|4|0 |7|5|22087238 + |7|5|22087238 = |7|5|44174476 |7|6|73162814 + |7|6|81837527 = |7|6|155000341 iii) Third purpose is to print the new output in an Output File Test_Output. iv) Now this comparison and addition operation is time bound. Now the fourth purpose is to check that these 2 operations should occur every 30 mins like an Audit. Please give your very valuable Inputs. Thanks and Regards, KiranKumar K. In reply to Re^2: Adding object identifiers corresponding to each IP and printing them to O/P File.
by Kiran Kumar K V N
|
|