GNU bug report logs - #43782
in egrep (grep 3.0), the order of include & exclude is surprisingly significant

Previous Next

Package: grep;

Reported by: John Ruckstuhl <John.Ruckstuhl <at> intusurg.com>

Date: Sat, 3 Oct 2020 19:03:02 UTC

Severity: normal

Done: Paul Eggert <eggert <at> cs.ucla.edu>

Bug is archived. No further changes may be made.

Full log


Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: John Ruckstuhl <John.Ruckstuhl <at> intusurg.com>
To: "bug-grep <at> gnu.org" <bug-grep <at> gnu.org>
Subject: in egrep (grep 3.0), the order of include & exclude is surprisingly
 significant
Date: Sat, 3 Oct 2020 19:00:49 +0000
[Message part 1 (text/plain, inline)]
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 <at> gnu.org
Report Cygwin bugs to: cygwin <at> cygwin.com
GNU grep home page: <http://www.gnu.org/software/grep/>
General help using GNU software: <http://www.gnu.org/gethelp/>

      johnru <at> 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 <at> 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 <at> 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>.


[Message part 2 (text/html, inline)]

This bug report was last modified 4 years and 321 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.