Ex:
Input file
******************
.WER
+ aaa bbb ccc
+ ddd eee
+ fff ggg hhh
******************
.SDF
+ zzz xxx yyy
+ iii
+ kkk lll
******************
.XCV
+ uuu vvv ggg
+ hhh qqq
+ rrr ttt jjj
******************
Desired Output:
******************
.WER aaa bbb ccc ddd eee fff ggg hhh
******************
.SDF zzz xxx yyy iii kkk lll
******************
.XCV uuu vvv ggg hhh qqq rrr ttt jjj
******************
I want to append line which matches pattern "+" to previous line and replace "+" with a space.
Can anyone solve this problem by using awk or sed (even grep) command?
I am a beginner in Linux. Please explain the details of the whole command line.