Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1 6/24/83; site harvard.ARPA Path: utzoo!watmath!clyde!burl!ulysses!mhuxl!ihnp4!zehntel!hplabs!hao!seismo!harvard!elvy From: elvy@harvard.ARPA (Marc Elvy) Newsgroups: net.unix Subject: Re: is grep broken (4.2) Message-ID: <14@harvard.ARPA> Date: Wed, 15-Aug-84 14:02:11 EDT Article-I.D.: harvard.14 Posted: Wed Aug 15 14:02:11 1984 Date-Received: Sat, 18-Aug-84 02:17:12 EDT References: <222@imsvax.UUCP> Organization: Aiken Computation Lab, Harvard Lines: 16 I think that grep is still working correctly. It is my understanding that grep will match any pattern you give it, wherever it appears within a line (or word). Therefore, "grep am.le /usr/dict/words" matches amble and ample, because they match the specification exactly, AND amulet and bramble, because the pattern exists within the words. In all cases, the dot IS only matching one character. In order to match words of the exact length of the pattern, you might consider using the -w switch, which indicates to grep that it should print only a word which matches in its entirety (rather likein ex). Therefore, "grep -w am.le /usr/dict/words" prints the five-character words for which you are looking. Marc Marc A. Elvy ( elvy@harvard.{arpa,uucp} ) Aiken Computation Laboratory Harvard University