Grep can find a pattern in a text, but not in a file



Hi,
Here is the scenario:

One source file ('source.txt') containing a list of software:
excel
emule
notepad

Another file ('pattern.txt') containing a list of standard software:
excel
notepad

I want to find every exotic software in the source file:
$grep -vf pattern.txt source.txt
emule

The result is ok.

But now, I update one soft in the source file:
excel v1.1
emule
notepad

$grep -vf pattern.txt source.txt
excel v1.1
emule

The "excel v1.1" is in the result, but it does contain the term
"excel", so it should not be there!
If I try without a file, the pattern "excel" is correctly taken into
account:
$ echo "excel v1.1" | grep -v excel
$

It seems that the -f option causes the problem.
Any idea to solve this ?

Regards

.



Relevant Pages

  • Re: Grep can find a pattern in a text, but not in a file
    ... One source file containing a list of software: ...
    (comp.unix.shell)
  • Re: Grep can find a pattern in a text, but not in a file
    ... One source file containing a list of software: ... $grep -vf pattern.txt source.txt ...
    (comp.unix.shell)
  • Re: Notepad Visual Basic and Excel
    ... the font choice) and then only get revealed after placing the text in Excel. ... it is opened in notepad to select all and copy the information for the ... subroutine to select cells and paste the information. ... Open the Excel Spreadsheet and use the Visual ...
    (microsoft.public.excel.misc)
  • RE: How Do I Replace Paragraphs With New Paragraphs In Excel?
    ... directly from the notepad copy....it was not being copied from another format. ... characters you were trying to replace where regular characters (not unicode). ... You don't need to text data into excel to convert to CSV. ...
    (microsoft.public.excel.misc)
  • Re: .csv file - zeroes disappear
    ... But when you open it in Notepad everything is ok? ... Be aware that if your credit card numbers ever have more than 15 digits, ... Excel only keeps track of 15 significant ... In either case, your .csv file should look fine, but you'll have ...
    (microsoft.public.excel)