User: Verotiana -- 2016-02-21 << 1345 1347 >> |
Hits: 2545 |
Type: Text data calculation |
Search all Text data calculation examples |
Description: |
How to calculate the time (1st column) difference between two consecutive lines where the 2nd and 5th columns are the same, and the 5th column is non empty? Output the 1st, 2nd, 3rd columns of the 2nd line, and the result. Thanks |
Input Sample: |
13:26.704,21, E, R, R, , , , , , , , , , , , 13:28.620,22, E, R, R, , , , , , , , , , , , 13:30.586,23, E, R, C, , , , , , , , , , , , 13:30.622,23, E, R, C, R, , , , , , , , , , , 13:32.624,24, E, R, C, , , , , , , , , , , , 13:32.630,24, E, R, C, D, , , , , , , , , , , 13:32.636,24, E, R, C, D, R, , , , , , , , , , 16:51.094,134, F, R, E, , , , , , , , , , , , 16:51.113,134, F, R, E, , , , , , , , , , , , 16:51.160,134, F, R, E, D, , , , , , , , , , 16:51.169,134, F, R, E, D, R, , , |
Output Sample: |
13:30.622 23 E 0.036 13:32.630 24 E 0.006 13:32.636 24 E 0.006 16:51.113 134 F 0.019 16:51.160 134 F 0.047 16:51.169 134 F 0.009 |
Answer: |
Hint: You need to Download and install "Replace Pioneer" on windows platform to finish following steps. |
1. ctrl-o open text file 2. ctrl-h open 'replace' dialogue * set 'replace unit' to 'Line' * uncheck 'print unmatched unit' option * set 'replace with pattern' to: * set 'if' to: * click 'advanced' tab: * set 'run following at the begining of replace' to: 3. click 'replace', done. |
Screenshot 1: Replace_Window |
Screenshot 2: Replace_Advanced_Window |