Output file should contain no more than one blank line between lines of text.
sed '/^$/d;G' filename
Running that command again this file:
aaa bbb ccc
returns: