No edit summary |
m (Delet all lines containt TXT moved to Delete all lines containing a pattern: Page moved by JohnBot to improve title) |
Revision as of 09:15, 18 October 2007
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