Date: Wed, 03 Feb 2021 11:49:40 +0000 From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 253209] grep -v -f some-empty-file does the wrong thing Message-ID: <bug-253209-227@https.bugs.freebsd.org/bugzilla/>
next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D253209 Bug ID: 253209 Summary: grep -v -f some-empty-file does the wrong thing Product: Base System Version: 13.0-STABLE Hardware: Any OS: Any Status: New Severity: Affects Only Me Priority: --- Component: bin Assignee: bugs@FreeBSD.org Reporter: freebsd@oldach.net # >a # echo blubb | fgrep -f a # echo blubb | fgrep -v -f a # Actually -v should invert the match however if the file is empty it seems i= t's not doing the right thing. For comparison (some random RedHat): # uname -a Linux rh.local 3.10.0-862.3.2.el7.x86_64 #1 SMP Tue May 15 18:22:15 EDT 2018 x86_64 x86_64 x86_64 GNU/Linux # >a # echo blubb | fgrep -f a # echo blubb | fgrep -v -f a blubb #=20 I stumbled over this while debugging a non-working script. I seem to rememb= er that it was working fine a while ago on stable/12.2. I suspect related to base r352691 - maybe the removal of the invert logic n= ear the end of util.c. --=20 You are receiving this mail because: You are the assignee for the bug.=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-253209-227>