I have a flat file containing all records in a single line because there is no new line character in the file. Ex: Name, Age, Band, Address, Name, Age, Band, Address, Name, Age, Band, Address Ideally they should have been 3 records but they are all being read by my ETL tool as a single record. I found something on the site which was similar to my problem and had the solution:
sed 's/\([^,]*,[^,]*\),/\1\n/g'1)
I have not tried it yet but I am going to, however, I dont understand anything after the sed 's/ . Can someone please make understand what each of these character after 's/ is doing.
and also if anyone has any other solution to get this long line of columns which is being read as single records to be split in rows.
Thanks,
Rajni