sed command to beautify output of an awk command -


i have following output awk command..i want beautify output follows..is there sed command give me expected output?

current output:-     https://code-comp.com/308271                                 (there white space line here)        https://code-comp.com/308270     466197     https://code-comp.com/308263     470188     https://code-comp.com/308262     https://code-comp.com/308261 

following expected output

    expected output:-     https://code-comp.com/308271     https://code-comp.com/308270 466197     https://code-comp.com/308263 470188     https://code-comp.com/308262     https://code-comp.com/308261 

this might work (gnu sed):

sed -r ':a;$!n;/\nhttps:/!{s/\n/ /;ta};s/\s*(\n|$)/\1/;p;d' file 

Comments

Popular posts from this blog

node.js - Bad Request - node js ajax post -

Why does Ruby on Rails generate add a blank line to the end of a file? -

keyboard - Smiles and long press feature in Android -