New related comments
Number of comments in the last 48 hours
Converting Mac style text files to Unix style
How to remove blank lines from a text file (in Unix)
5 comments. Current rating: (2 votes). Leave comments and/ or rate it.
Question:I need to remove all blank lines from a huge text file on a unix system. What's the easiest way to achieve this?
Answer:Use the command line text editor sed and issue the statement shown below.
It will create a temporary file, afterwards replace the original file with it.