I have a file like this ,19:36:19_19/06/2017 178619:38:21_19/06/2017 213819:40:22_19/06/2017 261219:42:23_19/06/2017 261319:44:28_19/06/2017 261319:46:32_19/06/2017 261319:48:33_19/06/2017 261319:50:35_19/06/2017 2613upto 6827 lines.I want to find the difference (only data not timing) of 4th and 1st rows if it is greater than 100 then print the first four lines, if not, then compare 5th and 2nd row and so on upto 6000 rows.Data in 4th row - 1st row (1786-2613) > 100 then, print first 4 lines (including timing). Then continue with comparison of 5th row- 2nd row (2138-2613) > 100 then print rows 2,3,4,5. Likewise I want to compare upto 6000 lines.I want output like this,19:36:19_19/06/2017 178619:38:21_19/06/2017 213819:40:22_19/06/2017 261219:42:23_19/06/2017 261319:38:21_19/06/2017 213819:40:22_19/06/2017 261219:42:23_19/06/2017 261319:44:28_19/06/2017 2613
To find difference between two rows of a same files
shell script;text processing