From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fee84,e0f812932bdb4520 X-Google-Attributes: gidfee84,public From: chmbt@zeus.bris.ac.uk (Mark Taylor) Subject: Re: OSF1 grep doesn't do REs? Date: 1998/02/20 Message-ID: #1/1 X-Deja-AN: 326917149 Sender: usenet@fsa.bris.ac.uk (Usenet) References: <34EAFC6A.794B@eddie.mit.edu> <34EB2C28.C7ED8CBB@iisc.com> X-Nntp-Posting-Host: zeus.bris.ac.uk Organization: University of Bristol, England Newsgroups: comp.unix.osf.osf1 John Chambers (from root account) wrote: > > On this Digital UNIX V4.0B (Rev. 564) system, grep and egrep both > seem to absolutely refuse to do regular expressions, and I was sorta > wondering if anyone knew some trick to make them behave normally. > > In checking with "man grep", I find that the RE stuff seems to have > been radically expanded, with things called BREs and EREs, and no > apparent clues as to how to tell the little beasties to enable one > or the other. Is there some magical incantation that's needed to > make it work? > > Here's proof of the problem, in a directory with lots of *.c files. > As you can see, there are several examples of 'fork' and 'Fork' in > the files, but '[Ff]ork' doesn't match anything. Using egrep gives > exactly the same output. > > ===> which grep > /sbin/grep I don't know if this is your problem but I thought I had very weird grep problems which I eventually identified (with absolutely no help from Digital) to be a pattern matching (globbing I guess) bug in the DU 4.0 /bin/csh. If you're using the C shell I suggest you give the same thing a go in, say ksh and see if that's what the problem is. I fixed our problem by copying a /bin/csh from DU 3.2, which isn't buggy (well, not in that respect). ----------------------------------------------------------------------- | Mark Beauchamp Taylor - physicist trapped in a chemist's body. | | mark.taylor@bris.ac.uk http://zeus.bris.ac.uk/~chmbt/index.html | | Department of Chemistry, University of Bristol, UK ------- -----------------------------------------------------| ... It's the future! | ------------------------