VI  "delete blank lines"

Posted on 2005-05-03
Last Modified: 2013-12-26
i've deleted hundreds of lines in a file, i need to remove the blank lines.

tried doing this but can't get it right.


what am i missing?
Question by:bt707

    Author Comment


    also tried useing this


    it just does a substitute and replaces the blank lines with blank

    Author Comment


    grep -v "^$" filename > newfilename

    this works but still trying to find how to do it in VI
    LVL 51

    Accepted Solution


    Author Comment

    Thanks ahoffmann, worked Great!!!

    Featured Post

    Maximize Your Threat Intelligence Reporting

    Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

    Join & Write a Comment

    This is to be the first in a series of articles demonstrating the development of a complete windows based application using the MFC classes.  I’ll try to keep each article focused on one (or a couple) of the tasks that one may meet.   Introductio…
    Introduction: The undo support, implementing a stack. Continuing from the eigth article about sudoku.   We need a mechanism to keep track of the digits entered so as to implement an undo mechanism.  This should be a ‘Last In First Out’ collec…
    This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
    Sending a Secure fax is easy with eFax Corporate ( First, Just open a new email message.  In the To field, type your recipient's fax number You can even send a secure international fax — just include t…

    731 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    16 Experts available now in Live!

    Get 1:1 Help Now