On Tue, Oct 16, 2007 at 10:30:15PM +0200, Oleg Verych wrote: > > > 1) The real Korn shell does the same thing; > > 2) It makes the code bigger :) > > Well, i don't know all that korn/bourne/tcsh/bash/whatever hell.
The POSIX specification is mostly based on the Korn shell and it is the prototypical POSIX compliant shell. However, more importantly this behaviour is consistent with POSIX. Since one of the primary aims of dash is to be as small as possible (the one being as fast as possible) while staying within the realms of POSIX-compliance, I'd rather not apply this patch. Unless of course if you can show me a way to do it while at the same time making dash smaller :) > Also, this hides real bugs, when arithmetical comparsion succeeds, even I think this is debatable. Even if dash made this an error it still may escape detection because the test command is not a special built-in and cannot cause the whole script to abort. So all this will do is print something to stderr and cause the test to return false instead of a possible true value. BTW, even bash is not completely consistent here: $ bash -o posix -c '[ "" -lt 3 ]' bash: line 0: [: : integer expression expected $ bash -o posix -c '[ " " -lt 3 ]' $ Cheers, -- Visit Openswan at http://www.openswan.org/ Email: Herbert Xu ~{PmV>HI~} <[EMAIL PROTECTED]> Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]