Can you please explain with contents in test.txt
in the input file
__________________
before 'a' there are 3 blank lines.
before 'c' there are 3 blank lines.
before 'e' there is 1 blank line.
before 'g' there are 2 blank lines.
after 'g' there are 4 blank lines.
output of sed command
__________________________-
before 'a' there is no blank line.
before 'c' there is 1 blank line.
before 'e' there is 1 blank line.
before 'g' there is 1 blank line.
after 'g' there is 1 blank line.
---------- Post updated at 05:55 PM ---------- Previous update was at 05:49 PM ----------
Quote:
Originally Posted by
RudiC
Read it like this: From the first non-empty line till the first blank line, DO NOT delete (explixit meaning); for the rest, DELETE (implicit).
Ok man...I understood ..Thank you so much...