egrep on the 3b1 is weird!
andrew at alice.att.com
Sat Mar 23 00:04:52 AEST 1991
In article <8783 at gollum.twg.com>, david at twg.com (David S. Herron) writes:
~ In article <1268 at hico2.UUCP> kak at 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")
~ egrep '(foo)|(bar)'
~ And read the F'ing manual a little more closely next time ...
~ <- David Herron, an MMDF & WIN/MHS guy, <david at twg.com>
~ <- Formerly: David Herron -- NonResident E-Mail Hack <david at ms.uky.edu>
~ <- "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
you get only the lines
echoed back, then all is well. if anything different happens,
your egrep is buggered.
andrew at research.att.com
More information about the Comp.sys.3b1