Hi,
I'm not a expert in shell programming, so i've come here to take help from u gurus.
I'm trying to tailor a csv file that i got to make it work for the LOAD FROM command.
I've a datatable csv of the below format -
--in file format
xx,xx,xx ,xx , , , , ,,xx,
xxxx,, ,, xxx,
yyy,yy,yy, , , ,yyy,yy,
yyy,yy,,,
....
--our file format
xx,xx,xx ,xx , , , , ,,xx,xxxx,, ,, xxx,
yyy,yy,yy, , , ,yyy,yy,yyy,yy,,,
As you can see above, each row of record is seperated by a line gap and also a row record is split into multiple lines. I've to make it in a format as shown below so that i can insert them into my informix db.
So i'm trying acheive two things here
- Remove blank lines
- Collide a data row splitted across multiple lines into one(by using the blank line as the end of a record)
Many Thanks!