[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Intriguing error with arithmetic evaluation
From: |
Chet Ramey |
Subject: |
Re: Intriguing error with arithmetic evaluation |
Date: |
Sun, 21 Aug 2016 21:22:51 -0400 |
User-agent: |
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 |
On 8/21/16 8:30 PM, L. A. Walsh wrote:
>
> Keeping "-e" semantics in a "bo[e]rn[e]-again-shell"
> compatible with the original shell would be the smart way to
> go. POSIX changed it to be incompatible with historical
> implementations -- thus, creating a new standard (@Chet), that
> was no longer a Portable-OS-IX (IX - Interface/eXchange) as
> the original POSIX was stated to be. You can call the fact
> that new POSIX versions after 2001 (maybe 1999) were no longer
> *portable* or Xchangeable with previous versions a conspiracy,
> but you can't deny that it is so. The change with "-e" is
> an example.
Jesus. OK, one last time. I promise never to respond to this kind
of trolling again.
Posix made an error in the 1992 version, in that the specification of
set -e was subtly incompatible with historical (and contemporary) shell
implementations. They corrected this in a later revision, after a
long, drawn-out discussion on the topic.
You can't simultaneously complain that Posix didn't standardize existing
behavior and that Posix corrected a problem by which Posix deviated from
existing behavior. Or maybe you can, I don't know.
> Wrong -- the older scripts assume it worked only on simple
> commands. POSIX changed that.
This is pretty much exactly the opposite of what happened. Posix
erred in specifying that set -e worked with simple commands, and
existing scripts that relied on that historical behavior broke when
bash implemented that standard. That was the straw, as it were, that
prompted the change to the standard.
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU chet@case.edu http://cnswww.cns.cwru.edu/~chet/
- Intriguing error with arithmetic evaluation, NO REPLY, 2016/08/12
- Re: Intriguing error with arithmetic evaluation, Chet Ramey, 2016/08/16
- Re: Intriguing error with arithmetic evaluation, L. A. Walsh, 2016/08/16
- Re: Intriguing error with arithmetic evaluation, Greg Wooledge, 2016/08/16
- Re: Intriguing error with arithmetic evaluation, Chet Ramey, 2016/08/16
Re: Intriguing error with arithmetic evaluation, Stephane Chazelas, 2016/08/23