| Linux Apache (6) Network (11) shell (12) |
How to remove blank lines from a text file (in Unix)
(1 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.
Comments:
| ||||||||||||||||||