I have an input file like below:
input.txt
number date duration revenuecode
------ ----------- -------- ------------
890011, 20160307104312, 120, CCF9000000VV
890011, 20160307104312, 120, CCF9000000NN
890011, 20160307104312, 120, CCF9000000CC
Some information about the columns:
date
column – uses theYYYYMMDDhhmmss
formatduration
column – uses seconds
Using the content of the file I have to create a new one which has to update the date
column:
- Date value in 1st row: Date [@1st row]
- Date Value in 2nd row: Date [@1st row] + 120 sec. ["Date revised value" @ row2]
- Date Value in 3rd row: ["Date revised value" @ row2] + 120 sec. ["Date revised value" @ row3]
Is there any function in shell script that does such iterative addition for a specific column (from a file)?