I have same question asked here in latest,but i have something different problem. Ex:
Input file
****************** .WER + aaa bbb ccc + ddd eee ****************** .SDF + zzz xxx yyy + iii + kkk lll ****************** .XCV + uuu vvv ggg + hhh qqq ****************** Desired Output:
****************** .WER aaa bbb ccc ddd eee ****************** .SDF zzz xxx yyy iii kkk lll ****************** .XCV uuu vvv ggg hhh qqq ****************** So as per above i have file where no of line is no certain. It can be 2,3 or 4 and every record separated with ****************** whether it is possible to convert all lines of each record in single line? For exact no of lines i have succesfully used paste -s -d ' \n'.