[SOLVED] merge lines bash
by pedropt from LinuxQuestions.org on (#509S1)
in this file with this text :
Quote:
i want it to bet like this :
Quote:
how can i do this ?
I am pretty sure is not complicated with sed , and i found some examples i could not get to work here like :
Code:sed 'H;1h;$!d;g;s/\n */http/g' myfilefrom this link
https://unix.stackexchange.com/quest...-previous-line
anyone have an idea ?


Quote:
http://somelink/fdgfdgdf/ restofthelink http://otherlink/dfgdfg/ blablabla ... etc |
Quote:
http://somelink/fdgfdgdf/restofthelink http://otherlink/dfgdfg/blablabla ... etc |
I am pretty sure is not complicated with sed , and i found some examples i could not get to work here like :
Code:sed 'H;1h;$!d;g;s/\n */http/g' myfilefrom this link
https://unix.stackexchange.com/quest...-previous-line
anyone have an idea ?