grep 'RE botch' error

John Sambrook john at uw-nsr.UUCP
Sat Aug 23 02:52:20 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 message is correct.  On our system it is a little clearer:

	grep: RE error 49: [ ] imbalance.

The "[" character is used to introduce a range specification, as in
"[a-z]" to match a single character in the range of "a" to "z".  To
search for a literal '[' character you should escape it with a 
backslash, as in:

	grep '\[' file

Hope this helps.


-- 
John Sambrook				Work: (206) 545-2018
University of Washington WD-12		Home: (206) 487-0180
Seattle, Washington  98195		UUCP: uw-beaver!uw-nsr!john



More information about the Comp.bugs.4bsd.ucb-fixes mailing list