Sunday, March 8, 2015

Re: Deleting lines steered by another file

Hi Matthias,

I did:
grep -Fvf B.txt A.html

which gaves me:

grep: conflicting matchers specified

and output nothing.

Best regards,
Meino





Mathias Rav <mathiasrav@gmail.com> [15-03-08 09:52]:
> Hi Meino
>
> You can accomplish this using grep on the command-line. If you want to
> search A.html for the strings given as lines in B.txt, use the
> command:
>
> grep -Ff B.txt A.html
>
> If you want to see lines of A.html that don't contain any of the
> strings given as lines in B.txt, use the command:
>
> grep -Fvf B.txt A.html
>
> Best,
> Mathias Rav
>
> On Sun, Mar 8, 2015 at 6:05 AM, <Meino.Cramer@gmx.de> wrote:
> > Hi,
> >
> > hopefully this can be done with vim in some way:
> > (using Linux)
> >
> > I have an file (html) which contains lines containing lines
> > like this one
> > (some stuff)1741_word_anotherword(some stuff)
> >
> > (pattern: .*<number>_<text>.*)
> >
> > I another file I have only a list of numbers, which may or may not
> > listed in the first file. A certain sorting may or may not be present.
> >
> > I want to delete all lines from the first file, which are listed in
> > the second file.
> >
> > Is that possible with vim?
> >
> > Best regards and thank you very much in advance for any help!
> > Have a nice weekend! :)
> > mcc
> >
> >
> > --
> > --
> > 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
> >
> > ---
> > You received this message because you are subscribed to the Google Groups "vim_use" group.
> > To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
> > For more options, visit https://groups.google.com/d/optout.
>
> --
> --
> 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
>
> ---
> You received this message because you are subscribed to the Google Groups "vim_use" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

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

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments: