For BSD-derived systems (including GNU):
You just need cat with the -s option which causes it to remove repeated empty lines from its output:
cat -s
From man page: -s --squeeze-blank: suppress repeated empty output lines.
For BSD-derived systems (including GNU):
You just need cat with the -s option which causes it to remove repeated empty lines from its output:
cat -s
From man page: -s --squeeze-blank: suppress repeated empty output lines.