egrep dies [Was: Still buggy after all these years?]

Thomas Maslen maslen at Neon.Stanford.EDU
Sat Sep 30 13:57:16 AEST 1989


In article <12066 at polya.Stanford.EDU> casley at neon.stanford.edu (Ross Casley) writes:
>There seems to be a bug in calendar.  When I try to run it today I wait a
>long time, then I get several messages that egrep has run out of swap
>space.  Now, calendar works by first running /usr/lib/calendar, which
>generates a pattern that is then fed to egrep.  The pattern is supposed to
>pick out the relevant lines from the calendar file.  My best guess is that
>since today is a Friday and the month changes over the weekend,
>/usr/lib/calendar generates an unusually long pattern.  Then egrep barfs

For what it's worth, here's the pattern from /usr/lib/calendar that
caused egrep to lose it:

(^|[ (,;])(([Ss]ep[^ ]* *|(09|9)/)0*29)([^0123456789]|$)
(^|[ (,;])((\* *)0*29)([^0123456789]|$)
(^|[ (,;])(([Ss]ep[^ ]* *|(09|9)/)0*30)([^0123456789]|$)
(^|[ (,;])((\* *)0*30)([^0123456789]|$)
(^|[ (,;])(([Oo]ct[^ ]* *|(010|10)/)0*1)([^0123456789]|$)
(^|[ (,;])((\* *)0*1)([^0123456789]|$)
(^|[ (,;])(([Oo]ct[^ ]* *|(010|10)/)0*2)([^0123456789]|$)
(^|[ (,;])((\* *)0*2)([^0123456789]|$)

An older version of Ultrix (2.0 -- I kid you not), a local
4.3-derivative, and SunOS (4.0.3) all do rather better on this pattern
(well, OK, SunOS egrep gives up with "regular expression too long",
but that's better than crashing and burning).  The SunOS
/usr/lib/calendar also generates a different pattern which is more
digestible, both to the SunOS egrep and to Ultrix 3.1 egrep.

Grrr.

Thomas Maslen					    maslen at neon.stamford.edu



More information about the Comp.unix.ultrix mailing list