in reply to Re: Parsing my script out put?
in thread Parsing my script out put?

Thats close to what i need, but i would need it to do two things. The output: ------------------- Received : 63.77.X.X > 89.X.X.X At : 17:40:36.808642649 Length : 140 Dur : 0.116475789996912 Sent : 89.X.X.X > 63.77.X.X At : 17:40:36.692166859 Length : 65 Needs to show how long it took to reply, so 808642649 - 692166859; also how could we have it literate over a list (or array) of different replys.

Replies are listed 'Best First'.
Re^3: Parsing my script out put?
by poj (Abbot) on May 23, 2014 at 17:57 UTC
    808642649 - 692166859

    That is the duration 0.1164757

    how could we have it literate over a list (or array) of different replys.

    Can you post some more data as example ?

    poj
      Yes sir. here is a list, now i need to stress that the ips dont allways come one row after another which is why searching for the line is partly needed. But based on what we know with $ip1 and $ip2, finding the pair should be easy.
      20:21:09:366500902 94.102.XX.XX > 63.77.X.X 65 20:21:09:484721194 63.77.X.X > 94.102.XX.XX 140 20:21:10:367148691 94.102.XX.XX > 81.192.X.X 65 20:21:10:432251992 81.192.X.X > 94.102.XX.XX 140 20:21:11:367836444 94.102.XX.XX > 103.229.X.X 65 20:21:11:665980944 103.229.X.X > 94.102.XX.XX 149 20:21:12:368606359 94.102.XX.XX > 69.33.X.X 65 20:21:12:588588107 69.33.X.X > 94.102.XX.XX 149 20:21:13:369344850 94.102.XX.XX > 85.32.X.X 65 20:21:13:396157789 85.32.X.X > 94.102.XX.XX 150 20:21:14:369986605 94.102.XX.XX > 4.28.X.X 65 20:21:14:518849388 4.28.X.X > 94.102.XX.XX 142 20:21:15:370662851 94.102.XX.XX > 217.153.X.X5 65 20:21:15:437401662 217.153.X.X > 94.102.XX.XX 143 20:21:16:371366478 94.102.XX.XX > 61.93.X.X 65 20:21:16:686433904 61.93.X.X > 94.102.XX.XX 142 20:21:17:372028662 94.102.XX.XX > 82.166.X.X 65 20:21:17:469587225 82.166.X.X > 94.102.XX.XX 141