bug-bash
[Top][All Lists]
Advanced

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

-e does not work with subscript


From: yozh
Subject: -e does not work with subscript
Date: Tue, 29 Jan 2008 00:36:43 +0300

Configuration Information [Automatically generated, do not change]:
Machine: i486
OS: linux-gnu
Compiler: gcc
Compilation CFLAGS:  -DPROGRAM='bash' -DCONF_HOSTTYPE='i486' 
-DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='i486-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 hilbert 2.6.18-openvz-amd64 #1 SMP Tue Apr 10 19:34:07 MSD 
2007 i686 GNU/Linux
Machine Type: i486-pc-linux-gnu

Bash Version: 3.1
Patch Level: 17
Release Status: release

Description:
        failed subscript does not cause script to exit, while -e is set

Repeat-By:
        
        % cat aa.sh   
        set -e
        
        (
            false
        )
            
        echo "unreachable"
        
        % bash ./aa.sh
        unreachable
        % zsh ./aa.sh 
        zsh: exit 1     zsh ./aa.sh
        
        Script aa.sh is expected to exit with error and print nothing. In bash 
it prints "unreachable".





reply via email to

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