Delete empty lines in a file
Deletes all lines that contain only whitespace from a file.
Authored by: KentBrought to you by Warp, a free terminal reimagined to work like a modern app.
file_name
Command
Copy
sed '/^[[:space:]]*$/d' file_name
Tags
Edit in GitHub
Copied