I got a input file with the following data which contains 2 lines with 9 fields, each field seperated by tilde
I need the output file in the required format
In the output file please note that id,id2,id3 need to print only untill the first comma. Also note that 4th field in first line is empty so there is nothing in between the tilde's. Please do consider that missing fields. As my data has more than 1000 lines of data.
Thanks in advance