I have a file that contains:
something something else something else again
I need a bash command, sed/grep w.e that will produce the fo
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
cat -s
From man page: -s --squeeze-blank: suppress repeated empty output lines.
-s --squeeze-blank: suppress repeated empty output lines.