1

Join the lines until next pattern match

view story
linux-howto

http://www.unix.com – Hi, I have a data file where data is splitted into multiple lines. And, each valid record starts with a patten date | <?xml and ends with pattern </dmm> e.g. 20120924|<?xml record 1 line1....record 1 line1....record 1 line1.... record 1 line2....record 1 line2....record 1 line2.... record 1 line3....record 1 line3....</dmm> 20120924|<?xml record 2 line1....record 2 line1....record 2 line1.... record 2 line2....record 2 line2....</dmm> 20120924|<?xml record 3 line1....record 3 line1 record 3 line2 record 3 line3....record 3 line3 record 3 line4....record 3 line4. (HowTos)