Bug in regex(3)? (and bug in sh(1))

Guy Harris guy at rlgvax.UUCP
Fri Mar 1 03:15:32 AEST 1985


> Has anybody had trouble with regcmp(3)/regex(3)?  I seem to have found a bug
> in handling expressions with breakout strings - regex corrupts the subject
> string pointed to by the second arg.

I tried it on our VAX with the System V version of "regex", and it worked
OK.  However, I did discover an amusing shell bug by accident; I mistyped
"sh -x stuff.sh >>stuff" (a test script) as "sh .x stuff.sh >>stuff", and
got

	: : cannot open

and got ".x.x" at the end of "stuff".  Looks like it's confused about what
should be written to standard output and standard error...

	Guy Harris
	{seismo,ihnp4,allegra}!rlgvax!guy



More information about the Comp.unix.wizards mailing list