[21015] in Athena Bugs
linux 9.1.17: dsgrep
daemon@ATHENA.MIT.EDU (Jonathan D Reed)
Mon Nov 4 12:56:00 2002
Message-Id: <200211041755.MAA14157@infinite-loop.mit.edu>
To: bugs@MIT.EDU
Date: Mon, 04 Nov 2002 12:55:58 -0500
From: Jonathan D Reed <jdreed@MIT.EDU>
System name: infinite-loop.mit.edu
Type and version: i686 9.1.17 (with mkserv)
Display type:
Shell: /bin/athena/tcsh
Window manager: ctwm -W
What were you trying to do?
Trying to use dsgrep with extended regexps such as:
dsgrep -e '(foo)|(bar)'
What's wrong:
It doesn't work. Dsgrepp'ing for "foo" returns one transaction.
Dsgrepp'ing for "bar" returns another. Dsgrepping for
'(foo)|(bar)' returns nothing.
What should have happened:
It should have worked, since the dsgrep manpage specifies that it
uses egrep-style regexps.
Please describe any relevant documentation references:
See the -c consult logs from 11/4/2002 around 1230-1249
Someone (zeno@mit) suggested that the problem is that in
/mit/source/athena/bin/discuss/dsgrep/dsgrep.c, line 126.
It currently reads:
flags = REG_NOSUB | (case_insens ? REG_ICASE : 0);
it should, however, read:
flags = REG_NOSUB | REG_EXTENDED | (case_insens ? REG_ICASE : 0);
(thanks to zeno@mit for pointing this out. The change was tested by
both me and kcr@mit. I believe kcr will also be submitting a patch.)