Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!samsung!olivea!oliveb!felix!asylvain@felix.UUCP From: asylvain@felix.UUCP (Alvin "the Chipmunk" Sylvain) Newsgroups: comp.editors Subject: Re: DELIMITED search Message-ID: <154695@felix.UUCP> Date: 11 Dec 90 20:25:13 GMT References: <1092@vm.ucs.UAlberta.CA> <339@tslwat.UUCP> <107@deeptht.UUCP> <1990Dec3.171557.16350@informix.com> Sender: daemon@felix.UUCP Reply-To: asylvain@felix.UUCP (Alvin "the Chipmunk" Sylvain) Distribution: na Organization: FileNet Corp., Costa Mesa, CA Lines: 25 In article <1990Dec3.171557.16350@informix.com> dberg@informix.com (David I. Berg) writes: > In article <107@deeptht.UUCP> spcecdt@deeptht.santa-cruz.ca.us (John DuBois) writes: > >In article <1990Oct29.134654.18929@cid.aes.doe.CA>, afsipmh@cidsv01.cid.aes.doe.CA writes: > > > >> How, in general, can I do delimited searches in UNIX. i.e. How do I > >> search for say the string "the" without finding there their other > >> thesaurus...... AND including "the" at the beginning and end of a line > >> eh? > > > The delimiters \< and \> will delimit the first and last characters of > a logical word. This syntax can be used in vi or any of the greps. > To find "the" without also finding all the words in which "the" is > contained as a string, find \. Just a small note: not all systems have a grep version that supports the \< and \> escapes. (vi nearly always does). In these versions of grep, there is usually a -w (or other) option which does the same thing. Altho that's not guaranteed everywhere, either. As with all things, your mileage may vary. -- asylvain@felix.UUCP (Alvin "the Chipmunk" Sylvain) ========================= Opinions are Mine, Typos belong to /usr/ucb/vi "We're sorry, but the reality you have dialed is no longer in service. Please check the value of pi, or see your SysOp for assistance." {}hplabs!felix!asylvain ================================================