bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: handling of test == by BASH's POSIX mode


From: Jon Seymour
Subject: Re: handling of test == by BASH's POSIX mode
Date: Mon, 28 May 2012 04:58:44 +1000

On Mon, May 28, 2012 at 2:08 AM, Dan Douglas <ormaaj@gmail.com> wrote:
> ... Bash
> just modifies conflicting features to the minimal extent necessary to bring it
> into compliance, which seems to be the path of least resistance.
>

Sure. I understand that this is a reasonable philosophy given that
aiming for complete avoidance of unspecified behaviour in the POSIX
spec would probably lead to a completely unusable shell.

That said, it is a shame from the point of view of interoperable scripts.

Perhaps I should just accept that dash, being more minimal, does a
better job of being that conformance testing shell?


> This would be a big job, I think, and not quite at the top of my wish-list.
> Right now you can increase the number of things that fail by explicitly
> disabling non-POSIX built-ins using the Bash "enable" builtin.
>

Thanks for that tip.

>
> Dash is useful for testing. The Bash answer is [[, which CAN do a lot of
> special error handling on due to it being a compound command. I wrote a bit
> about this here:
>
> http://mywiki.wooledge.org/BashFAQ/031/#Theory
>
> In reality, [[ is one of the very most portable non-POSIX features available.
> Most people shouldn't have to worry about avoiding it.
>

Thanks, I'll have a read.

jon.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]