-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 [adding bug-coreutils] According to Russ Allbery on 3/17/2009 11:10 AM: >>> bash-3.1$ expr "X$baz" : 'X\(foo\)$' || echo baz >>> foo >> I'm assuming this was from an older version of coreutils? Can someone >> determine 'expr --version' in the broken case, to see when it was fixed? > > rra@exodus:~$ expr "X$baz" : 'X\(foo\)$' || echo baz > foo > rra@exodus:~$ expr --version > expr (GNU coreutils) 5.97 > > eagle@windlord:~$ baz='foo >> bar' > eagle@windlord:~$ expr "X$baz" : 'X\(foo\)$' || echo baz > > baz > eagle@windlord:~$ expr --version > expr (GNU coreutils) 6.10 > > There's no mention that I can find in the coreutils NEWS file, though, in > a quick search for "expr". I see it, although it is indirect, and looks like a side effect of a related change for regex cleanup. The news for 6.0 states: expr no longer complains about leading ^ in a regular expression (the anchor is ignored), or about regular expressions like A** (the second "*" is ignored). expr now exits with status 2 (not 3) for errors it detects in the expression's values; exit status 3 is now used only for internal errors (such as integer overflow, which expr now checks for). POSIX seems to be a bit ambiguous on this point. It states that BRE anchors exist to limit "matching strings that begin or end a line", so it is not obvious whether the presence of a newline in the string parsed by expr counts as two lines or one overall string. But if most other implementations treat the $ as the anchor only of the overall string, then perhaps the coreutils NEWS item should be reworded to make it prominent that this behavior change was intentional. - -- Don't work too hard, make some time for fun as well! Eric Blake ebb9@xxxxxxx -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (Cygwin) Comment: Public key at home.comcast.net/~ericblake/eblake.gpg Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAkm/51AACgkQ84KuGfSFAYBFuACgqTVEGaC2Pc7o4HTNfeus0O2c fYwAn0p8ex3kpzY0w9M4z/ZOCdRB2KMJ =G2fe -----END PGP SIGNATURE----- _______________________________________________ Autoconf mailing list Autoconf@xxxxxxx http://lists.gnu.org/mailman/listinfo/autoconf