linux remove blank lines from file

To remove blank lines from a file on a unix or linux computer try this:

# grep -v "^$" filename > newfilename

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.