How to read the first line of source CSV and produce last line of output file
The first line of the source CSV has to be converted into the second line of target (also to add a first line manually). Rest of the lines in the target file to produce line-by-line for each source file, after line -2 onward. Hope it make sense, as following:
Target Line 1 (FIXED VALUE - beginning of file marker)
Source Line-3 ---->>>> Target Line 2 (different processing logic - convert data from source line 3)
Source Line-2 (Header of source data) ---->>>> Ignore
Source Line-3 ---->>>> Target Line 3
Source Line-4 ---->>>> Target Line 4
Source Line-5 ---->>>> Target Line 5
…
…
------------------- ------ >>>> Target Last Line ( different processing logic - convert data from source line 1 - End of file marker).
TAB separated target file, have one format for line-1, another for line-2, another for last line and anoter format for rest of the middle between Line-3 to last-line.