Re: Grep can find a pattern in a text, but not in a file
- From: "Icarus Sparry" <usenet@xxxxxxxxxxxxxxxxx>
- Date: 27 Sep 2006 10:25:37 GMT
On Wed, 27 Sep 2006 02:31:50 -0700, Dimitri Muringer wrote:
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 ?
Looks like a bug in your version of grep. It works correctly for me, using
Gnu grep version 2.5.1 on Debian Linux.
.
- Follow-Ups:
- Re: Grep can find a pattern in a text, but not in a file
- From: Scott McMillan
- Re: Grep can find a pattern in a text, but not in a file
- References:
- Grep can find a pattern in a text, but not in a file
- From: Dimitri Muringer
- Grep can find a pattern in a text, but not in a file
- Prev by Date: Re: redirecting stdin and stdout to a file
- Next by Date: Re: redirecting stdin and stdout to a file
- Previous by thread: Grep can find a pattern in a text, but not in a file
- Next by thread: Re: Grep can find a pattern in a text, but not in a file
- Index(es):
Relevant Pages
|