Re: Change in behavior

2016-12-13 Thread Vladimir Marek
> >> 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
> > 
> > That is what I wanted to hear, many thanks!
> 
> If you want the previous behavior, set the shell's compatibility level
> to `43'.

Nice. Thank you
-- 
Vlad



Re: Change in behavior

2016-12-13 Thread Chet Ramey
On 12/13/16 10:37 AM, Vladimir Marek wrote:
>> 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
> 
> That is what I wanted to hear, many thanks!

If you want the previous behavior, set the shell's compatibility level
to `43'.

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



Re: Change in behavior

2016-12-13 Thread Vladimir Marek
> 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

That is what I wanted to hear, many thanks!
-- 
Vlad



Re: Change in behavior

2016-12-13 Thread Chet Ramey
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, CWRUc...@case.eduhttp://cnswww.cns.cwru.edu/~chet/



Re: Change in behavior

2016-12-13 Thread Greg Wooledge
On Tue, Dec 13, 2016 at 09:16:12AM -0600, Eduardo Bustamante wrote:
> On Tue, Dec 13, 2016 at 9:08 AM, Vladimir Marek
>  wrote:
> [...]
> > $ 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
> Is `a.sh' a copy of `configure'?

I figured he simply lied about all of his "pasted terminal output".
Notice how the pathname spat out as $0 keeps changing too.

Nonetheless, the result can be reproduced, but only in posix mode.

imadev:~$ bash-4.3 -posix -c $': ${0.8}\necho after'
bash-4.3: ${0.8}: bad substitution
after
imadev:~$ bash-4.4 -posix -c $': ${0.8}\necho after'
bash-4.4: ${0.8}: bad substitution
imadev:~$ 



Re: Change in behavior

2016-12-13 Thread Vladimir Marek
> > $ 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
> Is `a.sh' a copy of `configure'?

Oh, yes, sorry, it's the same file. It's a part of libvisual-plugins's
configure script.

-- 
Vlad



Re: Change in behavior

2016-12-13 Thread Eduardo Bustamante
On Tue, Dec 13, 2016 at 9:08 AM, Vladimir Marek
 wrote:
[...]
> $ 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
Is `a.sh' a copy of `configure'?



Change in behavior

2016-12-13 Thread Vladimir Marek
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?

Thank you
-- 
Vlad