grep 'RE botch' error
David Elliott
dce at mips.UUCP
Sat Aug 23 10:36:49 AEST 1986
In article <191 at clan.UUCP> naren at clan.UUCP (Narendra Mehta) writes:
>
> grep '[' file
>
> gives a 'RE botch' error on our VAX-750 running 4.2BSD. If the fix
>has already been posted, could someone please mail me the diffs? Thanks.
The fix is to put 'exit(2)' after the line
fprintf(stderr, "RE botch\n");
in compile(), and the line
fprintf(stderr, "RE error\n");
in advance(). This only applies to /usr/ucb/grep in 4.2 and 4.3.
Without these, you get an 'RE error' message followed by a whole
slew of 'RE botch' messages. There isn't any reason for grep to
keep going if the RE compiles wrong, anyway.
Admittedly, when I first saw this bug reported, I fired off a note
to Narendra saying it wasn't a bug. Like a fool (sorry Barry), I
didn't try it out first (I did this last year as well, an event Dave
Sherman may remember).
David
More information about the Comp.bugs.4bsd.ucb-fixes
mailing list