Hello,
I have a csv file with "^" as text delimiters and "|" as field delimiters. It's converted from a xls file. One record looks like this:
^Tablete Internet^|Archos|501838|^Tableta Internet ARCHOS 80 G9
...| ...
(more lines)
... "501|838"^|330.00|USD|sl|12|0|Link|^router wireless 150 Mbps^|^5 ron^|more|^other info^|
I have bolded the "|" which is delimiting the actual fields. I need to replace the "|" and newlines which can apear multiple times in the 4th field which is also delimited by the text delimiters "^".
The output must be a csv file with | as delimiters and without any new line in the 4th field so I can insert the fields into a mysql database.
My best result by now is:
awk -F '[\^\^]' '{gsub("\|",";",$2); $2; print}'
but that does not remove the new lines... and also changes some "|" needed in the last fields.
Any ideas?
I forgot to mention that i've also tried with sed and perl but with no luck.
