On Thu, 07 Oct 2010 16:11:32 -0400, Nick Dokos wrote: > > Eric S Fraga wrote: > > > > echo /foo | egrep '^(/|[A-z]:/)' > > > > > > do you get the bad range end error message? If so, then your egrep > > > is indeed stricter than mine. > > > > I do indeed: > > > > : egrep: Invalid range end. > > > > Very strange. > > > > > > > LC_ALL=C texi2dvi ... > > > > > > > > but this may have unexpected side effects? I'm not sure if any of the > > > > latex suite use the locale... > > > > > > Yeah, perhaps... > > > > Interestingly, it *is* a locale issue: > > > > : $ echo /foo | LC_ALL=C egrep '^(/|[A-z]:/)' > > : /foo > > > > Yup: the egrep man page says > > ,---- > | Within a bracket expression, a range expression consists of two > | characters separated by a hyphen. It matches any single character that > | sorts between the two characters, inclusive, using the locale’s > | collating sequence and character set. For example, in the default C > | locale, [a-d] is equivalent to [abcd]. Many locales sort characters in > | dictionary order, and in these locales [a-d] is typically not equivalent > | to [abcd]; it might be equivalent to [aBbCcDd], for example. To obtain > | the traditional interpretation of bracket expressions, you can use the C > | locale by setting the LC_ALL environment variable to the value C. > `---- > > So as Achim pointed out, unless texi2dvi explicitly specifies the locale > for egrep, that regexp is busted. Even [A-Za-z] is busted in the absence > of a locale: it would have to be something like [:alpha:], although I'm > not sure what DOS allows/requires as a drive prefix. And even in the C > locale, [A-z] allows non-letters which, I'm pretty sure, cannot be used > as drive prefixes. > > Nick > Okay, I think this has convinced me to file a bug report. I'll start with Debian's system (reporting a bug against the texinfo package) and hope it filters upstream appropriately. texi2dvi definitely does not specify the locale for egrep. [:alpha:] is probably the right choice from the little I know about DOS...