How to delete empty lines using sed command under Linux / UNIX

Originally published at: https://www.cyberciti.biz/faq/using-sed-to-delete-empty-lines/

I need to delete all empty lines but could not figure out sed command for the same. How do I delete all empty lines with sed under Linux or Unix-like systems?

Does this article help?
Linux / Unix: Shell Remove Empty Lines


Linux sysadmin blog - Linux/Unix Howtos and Tutorials - Linux bash shell scripting wiki