Hi
below is the input file snippet.
here i want that all the line which is coming after 1 shoud be in one line.
so for exanple if after 1 there is two lines which is starting with 2 should be combine in one line.
input file content
1,8091012,BATCH_1430903_01,21,T,2,808738,,,,21121:87:01,
2,A,79020:04:25,IC,,
2,D,89014:03:40,u,7239021674,
1,5390021,BATCH_1330903_02,21,T,2,306738,,,,21121:15:01,
2,A,6190:05:09,IC,,
1,9650123,BATCH_1110903_02,21,T,3,904428,,,,21121:34:11,
2,A,9270:00:22,IC,,
1,9992013,BATCH_1000903_06,21,T,7,50128,,,,21121:99:15,
2,A,7790:05:24,IC,,
Required O/P
1,8091012,BATCH_1430903_01,21,T,2,808731,,,,21121:87:01,|2,A,79020:04:25,IC,,|2,D,89014:03:40,u,7239021674,
1,5390021,BATCH_1330903_02,21,T,2,306730,,,,21121:15:01,|2,A,6190:05:09,IC,,
1,9650123,BATCH_1110903_02,21,T,3,904429,,,,21121:34:11,|2,A,9270:00:22,IC,,
1,9992013,BATCH_1000903_06,21,T,7,501283,,,,21121:99:15,|2,A,7790:05:24,IC,,