bug-bash
[Top][All Lists]
Advanced

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

-e does not work properly with subscript


From: yozh
Subject: -e does not work properly with subscript
Date: Tue, 29 Jan 2008 00:49:03 +0300 (MSK)

Configuration Information [Automatically generated, do not change]:
Machine: i386
OS: linux-gnu
Compiler: gcc
Compilation CFLAGS:  -DPROGRAM='bash' -DCONF_HOSTTYPE='i386' 
-DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='i386-pc-linux-gnu' 
-DCONF_VENDOR='pc' -DLOCALEDIR='/usr/share/locale' -DPACKAGE='bash' -DSHELL 
-DHAVE_CONFIG_H  -I.  -I../bash -I../bash/include -I../bash/lib   -g -O2
uname output: Linux fireball 2.6.20-1-686-bigmem #1 SMP Wed Apr 25 11:30:36 UTC 
2007 i686 GNU/Linux
Machine Type: i386-pc-linux-gnu

Bash Version: 3.0
Patch Level: 16
Release Status: release

Description:
        failed subscript should cause script to exit if set -e

Repeat-By:
        % cat aa.sh 
        set -e
        
        ( false )
        
        echo "end"
        % bash aa.sh 
        end
        % zsh aa.sh
        zsh: exit 1     zsh aa.sh
        
        Script aa.sh should print nothing and exit with error. Under bash it 
prints "end" and exits with 0 code.




reply via email to

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