pydelion.com

sed: replacing multiple empty lines with one

As simple as:

sed -e '/^$/N;/^\n$/D' <file>
Exit mobile version