bug-bash
[Top][All Lists]
Advanced

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

Re: Change in behavior


From: Chet Ramey
Subject: Re: Change in behavior
Date: Tue, 13 Dec 2016 10:31:38 -0500
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:45.0) Gecko/20100101 Thunderbird/45.4.0

On 12/13/16 10:08 AM, Vladimir Marek wrote:
> Hi,
> 
> by coincidence I found change in behavior in how bash treats syntax
> error. Can you see the difference on your machines too?
> 
> $ cat configure
> set -o posix
> echo ${0.8}
> echo after
> 
> $ bash a.sh
> 3.2.52(1)-release
> a.sh: line 3: ${0.8}: bad substitution
> after
> 
> $ bash a.sh
> 4.3.46(1)-release
> build/i86/configure: line 3: ${0.8}: bad substitution
> after
> 
> $ bash a.sh
> 4.4.5(1)-release
> build/i86/configure: line 3: ${0.8}: bad substitution
> 
> 
> I also tried on Gentoo and bash 4.4.5 didn't run the last line similarly
> to my tests. Is it intended change?

Posix says a word expansion error shall cause a non-interactive shell to
exit:

http://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18_08_01

Bash posix mode changed as the result of this report:

http://lists.gnu.org/archive/html/bug-bash/2015-08/msg00013.html

Chet
-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU    address@hidden    http://cnswww.cns.cwru.edu/~chet/



reply via email to

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