Combine the Carriage Returns into one line
I want to remove the "\+ Carrige Return" in the following text file:
id|column1|column2|comment| 1|aaa|bbb|he is great| 2|aa2|bb2|she is good| 3|aa3|bb3| fgf\ fgf\ gg| 4|aa4|bb4|bbb\ nnn\| 5|aa5|bb5|gggg| After convert: id|column1|column2|comment| 1|aaa|bbb|he is great| 2|aa2|bb2|she is good| 3|aa3|bb3| fgf fgf gg| 4|aa4|bb4|bbb nnn| 5|aa5|bb5|gggg| |
Code:
sed -i.bck -e :label -e '/\\$/N; s/\\\n/ /; t label' file |
Colucix, Thank you very much.
|
All times are GMT -5. The time now is 09:24 PM. |