Hi All,
I have one file which contains time for request and response.
I want to calculate time difference in milliseconds for each line.
This file can contain 10K lines.
Sample file with 4 lines.
for first line.
Request Time: 15:23:45,255
Response Time: 15:23:45,258
Time diff is 3 milliseconds.
I want to print this in last of every line.
Like this
15:23:45,255 WARN <NTS> RouteRequest : 518318 ### 15:23:45,258 CRIT <ISUP> RouteResponse : 518318 ||3
15:23:45,255 WARN <NTS> RouteRequest : 518318 ### 15:23:45,258 CRIT <ISUP> RouteResponse : 518318
15:23:45,274 WARN <NTS> RouteRequest : 518319 ### 15:23:45,278 CRIT <ISUP> RouteResponse : 518319
15:23:45,284 WARN <NTS> RouteRequest : 518320 ### 15:23:45,286 CRIT <ISUP> RouteResponse : 518320
15:23:45,294 WARN <NTS> RouteRequest : 518321 ### 15:23:45,296 CRIT <ISUP> RouteResponse : 518321
Thanks,
Raza
---------- Post updated at 05:00 PM ---------- Previous update was at 04:45 PM ----------
Hi All,
You can consider it like this also.
I have 3 fields in every line.
I want time difference in milli seconds as 4th column. It should be extracted from difference between column 2nd and 1st.
Original File.
15:23:45,212 15:23:45,215 518316
15:23:45,253 15:23:45,255 518317
15:23:45,255 15:23:45,258 518318
15:23:45,274 15:23:45,278 518319
15:23:45,284 15:23:45,286 518320
15:23:45,294 15:23:45,296 518321
Output
15:23:45,212 15:23:45,215 518316 # 3
15:23:45,253 15:23:45,255 518317 # 2
15:23:45,255 15:23:45,258 518318 # 3
15:23:45,274 15:23:45,278 518319 # 4
15:23:45,284 15:23:45,286 518320 # 2
15:23:45,294 15:23:45,296 518321 # 2
Present file has time diff at mili second level only, but in original file there can be difference at minute/second level also.
Regards,
Raza Ali