The file has 10 columns out of which one column has new line characters. this column is quoted with double quotes but the record delimiter is also a unix new line character and this is causing the record to be skipped.
I was successfull in reading the file if the record delimiter is changed from new line to another character and specifying that the column is quoted but the same doesnot work when using new line as record delimiter.
This can be done by reading from a server seq file stage but cant go with that. Also i need to preserver the \n characters.
Any ideas would be appreciated
Thanks
read column with new line characters
Moderators: chulett, rschirm, roy
-
- Premium Member
- Posts: 730
- Joined: Tue Nov 04, 2008 10:14 am
- Location: Bangalore
-
- Premium Member
- Posts: 536
- Joined: Thu Oct 11, 2007 1:48 am
- Location: Bangalore
You can remove that new line using below unix command:-
Code: Select all
awk -F"delimiter" 'NF<10{printf("%s",$0);getline;print;next}1'
-
- Premium Member
- Posts: 730
- Joined: Tue Nov 04, 2008 10:14 am
- Location: Bangalore