Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: notesfiles Path: utzoo!linus!decvax!tektronix!hplabs!hp-pcd!orstcs!leed From: leed@orstcs.UUCP (leed) Newsgroups: net.unix Subject: Re: is grep broken (4.2) Message-ID: <13200006@orstcs.UUCP> Date: Thu, 9-Aug-84 13:04:00 EDT Article-I.D.: orstcs.13200006 Posted: Thu Aug 9 13:04:00 1984 Date-Received: Thu, 30-Aug-84 08:31:48 EDT References: <222@imsvax.UUCP> Organization: Oregon State University - Corvallis, OR Lines: 17 Nf-ID: #R:imsvax:-22200:orstcs:13200006:000:788 Nf-From: orstcs!leed Aug 23 09:04:00 1984 "" Let us not forget that grep also accepts the meta-characters '<' and '>' for word boundry matching. Yes, it's true that the dictionary is set up with one word per line, but in the more general sense, one could search using: grep '\' any_file_name And this would find 'ample', but not 'trample'. The reason for needing both quotes and the back-slash is that the quotes are to satisfy the shell that the commands are executed in, and the back-slashes are to tell grep that the less-than and greater-than signs are meta-characters. Without the back- slashes, grep thinks you want to match on a real less-than or greater-than sign! From the never-stationary soul of: the masked non-system manager (:~:) (otherwise known as: ...!hplabs!hp-pcd!orstcs!leed -- W. Lee Duncan)