Delete empty lines in a file

Deletes all lines that contain only whitespace from a file.

Authored by: Kent
file_name

Command
Copy
sed '/^[[:space:]]*$/d' file_name
Tags