Sample Header Ad - 728x90

Removing more than two consecutive newlines with ed

2 votes
2 answers
692 views
Input file: 1 line1\ 2 line2\ 3 line3\ 4 \ 5 line4\ 6 \ 7 \ 8 line5\ Desired output: 1 line1 2 line2 3 line3 4 5 line4 6 7 line5 Is it possible with POSIX ed? Removing the trailing backslashes is easy, but how can I also handle consecutive blackslashes as expected output?
Asked by user28512 (31 rep)
Dec 9, 2012, 05:05 PM
Last activity: Dec 16, 2024, 08:56 AM