Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!lll-crg!nike!sri-spam!parcvax!hplabs!tektronix!uw-beaver!tikal!sigma!uw-nsr!john From: john@uw-nsr.UUCP (John Sambrook) Newsgroups: net.bugs.4bsd Subject: Re: grep 'RE botch' error Message-ID: <351@uw-nsr.UUCP> Date: Fri, 22-Aug-86 12:52:20 EDT Article-I.D.: uw-nsr.351 Posted: Fri Aug 22 12:52:20 1986 Date-Received: Sun, 24-Aug-86 20:50:34 EDT References: <191@clan.UUCP> Reply-To: john@uw-nsr.UUCP (John Sambrook 5-2018) Organization: UW-Bioengineering, Seattle, WA Lines: 24 Summary: This is not a bug In article <191@clan.UUCP> naren@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