www.delorie.com/archives/browse.cgi | search |
X-Spam-Check-By: | sourceware.org |
To: | cygwin AT cygwin DOT com |
From: | "Daniel Einspanjer" <deinspanjer AT gmail DOT com> |
Subject: | Problem with grep -Fwf (version 2.5.1a-1 and 2.5.1a-2) |
Date: | Fri, 28 Jul 2006 13:53:32 -0400 |
Lines: | 33 |
Message-ID: | <eadiub$tfs$1@sea.gmane.org> |
Mime-Version: | 1.0 |
X-IsSubscribed: | yes |
Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com> |
List-Archive: | <http://sourceware.org/ml/cygwin/> |
List-Post: | <mailto:cygwin AT cygwin DOT com> |
List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs> |
Sender: | cygwin-owner AT cygwin DOT com |
Mail-Followup-To: | cygwin AT cygwin DOT com |
Delivered-To: | mailing list cygwin AT cygwin DOT com |
Using the following files both of which had dos2unix run on them to be sure there were no line-ending issues: ===== data.txt ======= abc defghi ====================== ===== filter.txt ===== abc deghi ====================== These commands work as expected: $ fgrep -f filter.txt data.txt $ tail -1 data.txt | fgrep -wf filter.txt But this command fails to return ghi: $ fgrep -wf filter.txt data.txt So it seems that after a match is discarded because it is not a full word (due to the -w flag), subsequent full word matches are also discarded. I've tested this with the grep 2.5.1 installed on a recent Gentoo GNU/Linux machine and it behaves properly so I am guessing it might be a problem specific to the cygwin port. I have not worked with Cygwin source yet, so I'm reporting the problem, and if I finish with the work tasks that surfaced the problem, I'll be happy to dig into the source and attempt to create a patch, but I'm hoping there might be someone out there that can quickly determine the problem and solution. :) -- Daniel Einspanjer -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |