emacs-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#43782: closed (in egrep (grep 3.0), the order of include & exclude i


From: GNU bug Tracking System
Subject: bug#43782: closed (in egrep (grep 3.0), the order of include & exclude is surprisingly significant)
Date: Sat, 03 Oct 2020 19:45:02 +0000

Your message dated Sat, 3 Oct 2020 12:44:22 -0700
with message-id <e57d2ba1-de76-baba-58de-35b31569e95c@cs.ucla.edu>
and subject line Re: bug#43782: in egrep (grep 3.0), the order of include & 
exclude is surprisingly significant
has caused the debbugs.gnu.org bug report #43782,
regarding in egrep (grep 3.0), the order of include & exclude is surprisingly 
significant
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs@gnu.org.)


-- 
43782: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=43782
GNU Bug Tracking System
Contact help-debbugs@gnu.org with problems
--- Begin Message --- Subject: in egrep (grep 3.0), the order of include & exclude is surprisingly significant Date: Sat, 3 Oct 2020 19:00:49 +0000
In egrep (grep 3.0), the order of options (multiple --include and --exclude), is surprisingly significant.
I was puzzled by 5 extra output lines in my first egrep,
so I did another egrep, with the --include moved up front.
Known bug?
Yes, I realize that the include by itself would have been sufficient, the exclude in this case is superfluous.
Thx,
John R.
 
Report bugs to: bug-grep@gnu.org
Report Cygwin bugs to: cygwin@cygwin.com
GNU grep home page: <http://www.gnu.org/software/grep/>
General help using GNU software: <http://www.gnu.org/gethelp/>
 
johnru@ISIMFGDEV400 /cygdrive/c/Program Files (x86)/foxtrot/EC Test SW (750390-mango)
$ egrep -r -i -n -l --exclude="*.bak" --include="*.py" "\.name\b|testname" ISITestFramework | cat -n
     1 ISITestFramework/DUT/CameraModule/CameraModule/CameraModule.py
     2 ISITestFramework/DUT/CameraModule/CameraModule/CameraModule_0.py
     3 ISITestFramework/DUT/EC/EC.py
     4 ISITestFramework/DUT/Endoscope/Endoscope.py
     5 ISITestFramework/DUT/GenericDUT.py
     6 ISITestFramework/DUT/LightEngine/LightEngine/LightEngine.py
!!   7 ISITestFramework/HTML/BatFileUtils.html
!!   8 ISITestFramework/HTML/Libs/jquery/1.12.2/jquery.min.js
     9 ISITestFramework/IQOQDQUtils.py
!!  10 ISITestFramework/Reports/ReportTemplates/Libraries/GoogleChartsJsapi.js
!!  11 ISITestFramework/Reports/ReportTemplates/Libraries/jquery-latest.min.js
!!  12 ISITestFramework/Reports/ReportTemplates/TestResultsSimple.html
    13 ISITestFramework/Reports/ReportTools.py
    14 ISITestFramework/Reports/ReportUtils.py
    15 ISITestFramework/Reports/SummaryMetricWriter.py
    16 ISITestFramework/Test.py
    17 ISITestFramework/TestTools.py
 
johnru@ISIMFGDEV400 /cygdrive/c/Program Files (x86)/foxtrot/EC Test SW (750390-mango)
$ egrep -r -i -n -l --include="*.py" --exclude="*.bak" "\.name\b|testname" ISITestFramework | cat -n
     1 ISITestFramework/DUT/CameraModule/CameraModule/CameraModule.py
     2 ISITestFramework/DUT/CameraModule/CameraModule/CameraModule_0.py
     3 ISITestFramework/DUT/EC/EC.py
     4 ISITestFramework/DUT/Endoscope/Endoscope.py
     5 ISITestFramework/DUT/GenericDUT.py
     6 ISITestFramework/DUT/LightEngine/LightEngine/LightEngine.py
     7 ISITestFramework/IQOQDQUtils.py
     8 ISITestFramework/Reports/ReportTools.py
     9 ISITestFramework/Reports/ReportUtils.py
    10 ISITestFramework/Reports/SummaryMetricWriter.py
    11 ISITestFramework/Test.py
    12 ISITestFramework/TestTools.py
 
johnru@ISIMFGDEV400 /cygdrive/c/Program Files (x86)/foxtrot/EC Test SW (750390-mango)
$ egrep --version
grep (GNU grep) 3.0
Packaged by Cygwin (3.0-2)
Copyright (C) 2017 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
 
Written by Mike Haertel and others, see <http://git.sv.gnu.org/cgit/grep.git/tree/AUTHORS>.
 
 

--- End Message ---
--- Begin Message --- Subject: Re: bug#43782: in egrep (grep 3.0), the order of include & exclude is surprisingly significant Date: Sat, 3 Oct 2020 12:44:22 -0700 User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0
On 10/3/20 12:00 PM, John Ruckstuhl wrote:
In egrep (grep 3.0), the order of options (multiple --include and --exclude), 
is surprisingly significant.
I was puzzled by 5 extra output lines in my first egrep,
so I did another egrep, with the --include moved up front.

That's expected behavior, but it's not documented and should be. Thanks for bringing it up. I installed the attached doc patch.

Attachment: 0001-doc-document-include-exclude-better.patch
Description: Text Data


--- End Message ---

reply via email to

[Prev in Thread] Current Thread [Next in Thread]