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

Your email address will not be published. Required fields are marked *

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