Jonathan Blanchard wrote: > Hi, > While using file as patterns to grep, some unexpected match occurs. > In this two files below no line is similar but the flowing command return > one match. > >>> grep -f .tmp_check1 .tmp_check2 > 3...@true >>> grep -V > grep (grep de GNU) 2.5.1 > Copyright 1988, 1992-1999, 2000, 2001 Free Software Foundation, Inc.
Not unexpected.tmp_check1 contains 3...@true, which of course matches 3...@true in tmp_check2. Try doing grep '3...@true' tmp_file2 and see that it matches a line in tmp_check2. What you want here is probably the -x option. -- D.
