SyntaxFix
Write A Post
Hire A Developer
Questions
You can sed's -i option to edit in-place without using temporary file:
-i
sed -i '/^$/d' file