VI  "delete blank lines"

Posted on 2005-05-03
Medium Priority
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
  • 3

Author Comment

ID: 13920331

also tried useing this


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

Author Comment

ID: 13920364

grep -v "^$" filename > newfilename

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

Accepted Solution

ahoffmann earned 2000 total points
ID: 13920727

Author Comment

ID: 13920900
Thanks ahoffmann, worked Great!!!

Featured Post

Upgrade your Question Security!

Add Premium security features to your question to ensure its privacy or anonymity. Learn more about your ability to control Question Security today.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction: Displaying information on the statusbar.   Continuing from the third article about sudoku.   Open the project in visual studio. Status bar – let’s display the timestamp there.  We need to get the timestamp from the document s…
Introduction: Ownerdraw of the grid button.  A singleton class implentation and usage. Continuing from the fifth article about sudoku.   Open the project in visual studio. Go to the class view – CGridButton should be visible as a class.  R…
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.
Whether it be Exchange Server Crash Issues, Dirty Shutdown Errors or Failed to mount error, Stellar Phoenix Mailbox Exchange Recovery has always got your back. With the help of its easy to understand user interface and 3 simple steps recovery proced…
Suggested Courses

862 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