unix - Removing newline character from record -


below data , not able remove newline character sed or awk command . when use tr command, records merge single record , sed , awk not able help.

can please let me know command if 1 faced type of data.

"2016-03-05 00:48:11|0|i|not set   ||||||||||||||||2014-01-13-12.27.15.234361|2014-01-14| |0|" "pls rpl  2 tr-ns fatal error  |2 tr-ns fatal error                                 |trblrprt|bdtrrpl|bwrinerr|0|||        ||                                                                      " "2016-03-05 00:48:11|0|i|not set   ||||||||||||||||2014-03-30-16.08.41.215789|2014-04-01| |0|" "pls rplc bad tr                 |pls rplc bad tr                                       |trblrprt|bdtrrpl|        |0|||        ||                                                                      " "2016-03-05 00:48:11|0|i|not set   ||||||||||||||||2014-04-08-13.32.59.536559|2014-04-09| |0|fatal error 3 please refer" "to ete|                                                       |trblrprt|bdtrrpl|        |0|||        ||                                                                      " 

your question isn't clear, looks data split across 2 lines assuming every line supposed begin timestamp. awk command join 2 lines together:

awk 'nr % 2 == 1 { prev = $0; } nr % 2 == 0 { print prev $0; }' 

actually this answer has more concise ways of doing awk or sed.


Comments

Popular posts from this blog

java - Run spring boot application error: Cannot instantiate interface org.springframework.context.ApplicationListener -

reactjs - React router and this.props.children - how to pass state to this.props.children -

Excel VBA "Microsoft Windows Common Controls 6.0 (SP6)" Location Changes -