I didn't understand clearly what you were expecting until I actually ran
your example. I think this shows your expectations more clearly:
test a = a && {
echo this line should be displayed
test a = b && {
echo this line should not be displayed and is not
}
# echo uncomment this line
On 03/28/2018 01:22 PM, Klaus Bartels wrote:
If you execute the following script the result is wrong. It is self
explaining:
Sorry, but your script behaves as documented by POSIX. It is not a bug
in bash, but in your expectations.
---
#
# GNU bash, version
On Wed, Mar 28, 2018 at 08:22:16PM +0200, Klaus Bartels wrote:
> If you execute the following script the result is wrong. It is self
> explaining:
> ---
> #
> # GNU bash, version 4.4.12(1)-release (x86_64-slackware-linux-gnu)
> # Linux ... 4.9.31 #1 SMP Wed Jun 7
If you execute the following script the result is wrong. It is self
explaining:
---
#
# GNU bash, version 4.4.12(1)-release (x86_64-slackware-linux-gnu)
# Linux ... 4.9.31 #1 SMP Wed Jun 7 14:57:36 CDT 2017 x86_64 Intel(R)
Core(TM) i5-7400 CPU @ 3.00GHz GenuineIntel