Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!zaphod.mps.ohio-state.edu!sol.ctr.columbia.edu!emory!att!att!andante!alice!andrew From: andrew@alice.att.com (Andrew Hume) Newsgroups: comp.sys.3b1 Subject: Re: egrep on the 3b1 is weird! Summary: calmness please. Keywords: egrep unix-pc 3b1 Message-ID: <20093@alice.att.com> Date: 22 Mar 91 14:04:52 GMT References: <1268@hico2.UUCP> <8783@gollum.twg.com> Organization: AT&T Bell Laboratories, Murray Hill NJ Lines: 40 In article <8783@gollum.twg.com>, david@twg.com (David S. Herron) writes: ~ In article <1268@hico2.UUCP> kak@hico2.UUCP (Kris A. Kugel) writes: ~ >Am I confused, or does egrep on the 3b1 ~ >handle multiple regular expressions incorrectly? ~ > ~ > egrep 'foo|bar' ~ > ~ >seems to match '[fb][oa][or]' patterns, ~ >instead of what I wanted (matching lines with "foo" or "bar") ~ ~ Try ~ ~ egrep '(foo)|(bar)' ~ ~ And read the F'ing manual a little more closely next time ... ~ ~ ~ -- ~ <- David Herron, an MMDF & WIN/MHS guy, ~ <- Formerly: David Herron -- NonResident E-Mail Hack ~ <- ~ <- "MS-DOS? Where we're going we don't need MS-DOS." --Back To The Future with respect, mr herron, kris apparently did read the manual and his/her expression is perfectly valid. the parentheses in your retort are superfluous. if after typing egrep 'foo|bar' foo bar far you get only the lines foo bar echoed back, then all is well. if anything different happens, your egrep is buggered. andrew@research.att.com