Nelson H. F. Beebe wrote: > I agree with a previous poster that the altered behaviour of expr in > coreutils-7.0 as a result of using getopt() for option parsing is > acceptable, and consistent with many other utilities, and with GNU and > POSIX interpretation of a double-hyphen option.
I don't agree > Here is another problem area with expr (in general, not just the GNU > version). Consider these two similar cases: > > expr -1 + 3 > expr ' -1' + 3 > > To a human, both of these should evaluate to 2. > > Apple Mac OS X, DEC Alpha OSF/1, OpenBSD, Sun Solaris 10, SGI IRIX > native expr, and GNU/coreutils 7.0 produce 2 for the first, but > complain "expr: non-numeric argument:" for the second. That's what I would expect. Note that the old and current coreutils produce the same output for the examples above. But expanding it slightly shows where the changes in coreutils 7.0 are questionable: $ ./expr-7.0 -11 + 3 ./expr: syntax error $ expr-6.9 -11 + 3 -8 [minix & *BSD madness elided] thanks for checking all these systems BTW. That's great info to have. I didn't post a patch as James may like to address this. I'll post something tomorrow if not. cheers, Pádraig. _______________________________________________ Bug-coreutils mailing list Bug-coreutils@gnu.org http://lists.gnu.org/mailman/listinfo/bug-coreutils