Considering following comma delimited input file:
4th fields from each record, I need to generate serial numbers with same other fields of the record that SN belong to.
for first record
(03 - 01 = 2+1) This number of new records
for 2nd record
(06 - 04 = 2+1) This number of new records
1,13/06/17,01,03,D151 1,13/06/17,01,03,D151,1 1,13/06/17,01,03,D151,2 1,13/06/17,01,03,D151,3 2,25/06/17,04,06,D154 2,25/06/17,04,06,D154,4 2,25/06/17,04,06,D154,5 2,25/06/17,04,06,D154,6
for I can generate the SNs yet linking them to the original record is the issue here.