We are using flat text files to store in teradata table after transformations from Informatica. The file contains 14 fields (~ separated). But as the records are getting scattered over multiple lines informatica is not able to pick it up.Is there's any way that we join the record by counting the delimiter using sed/awk or any other command?Sample record---48602040112~4100010080701242015~2010-01-21 10:23:44~Foods~7~Poultry ~Perdue Smart Chicken~Circular~06-JAN-10~24-JAN-10~$5.99~24 oz., select varietiesup to 4 at this price, additionalSave up to $4.00 load up on savings~~1598Ideally it should be like --48602040112~4100010080701242015~2010-01-21 10:23:44~Foods~7~Poultry ~ Perdue Smart Chicken~Circular~06-JAN-10~24-JAN-10~$5.99~24 oz., select varieties up to 4 at this price, additional Save up to $4.00 load up on savings~~1598If it's not obvious, it contains new line characters.
Single record of a file getting splitted over multiple lines
text processing;files;sed;awk