Previous TipNext Tip

Tip: #213 - Delete all lines containing a pattern

Created: February 10, 2002 10:43 Complexity: basic Author: tarjei Version: 5.7 Karma: 30/33 Imported from: Tip#213

I needed this one when I was editing an ldif file:

I needed to delete all lines containing "profile":


very handydandy


Can I get this tips in my INBOX??

Regards, Seenu. , February 18, 2002 22:53

use g/^$/d to delete all the blank lines in your file.

(I think there is an easier/faster way to do this, but I forget how) , August 17, 2003 22:36

Community content is available under CC-BY-SA unless otherwise noted.