On Thu, March 10, 2011 3:17 pm, Chris Hudson wrote: > Hi, I have a question. I have a very big directory/subdirectory listing > that has been outputted to a file. > I would like to delete all the dot ( . ) and dot-dot ( .. ) directories, > so > that I just have a listing of the "real" directories. > > So I want to delete all lines that look like this: > > > drwxrwx--- 2 odevora dba 4096 Feb 21 15:41 . > > drwxrwx--- 4 odevora dba 4096 Oct 2 2009 .. > > > And leave all the other lines, such as this: > > > drwxrwx--- 2 odevora dba 4096 Feb 21 15:41 bin > > drwxrwx--- 2 odevora dba 110592 Mar 8 21:07 log >
:g/\.\.\?$/d :h :g regards, Christian -- You received this message from the "vim_use" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php
