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":
Can I get this tips in my INBOX??
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