egrep on the 3b1 is weird!

Andrew Hume andrew at
Sat Mar 23 00:04:52 AEST 1991

In article <8783 at>, david at (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")
~ Try
~ 	egrep '(foo)|(bar)'
~ And read the F'ing manual a little more closely next time ...
~ -- 
~ <- David Herron, an MMDF & WIN/MHS guy, <david at>
~ <- Formerly: David Herron -- NonResident E-Mail Hack <david at>
~ <-
~ <- "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'
you get only the lines
echoed back, then all is well. if anything different happens,
your egrep is buggered.

	andrew at

More information about the Comp.sys.3b1 mailing list