FANDOM


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":


g/profile/d


very handydandy

Comments

Can I get this tips in my INBOX??

Regards, Seenu.

seenutn--AT--cdotb.ernet.in , 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)

pdwalker--AT--usa.net , August 17, 2003 22:36


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