that the man page section on "trap ERR" says that the trap is
triggered if a "simple command" returns >0 (sharing exceptions with "set
-e"). It seems however that the trigger is the same as for "set -e", as in
trap 'echo "error caught ($?), exiting"; exit 1' ERR
(exit 2)
echo done
Question 2: Are "set -e" and "trap ... ERR" triggered by the same events?
Clues would be appreciated.
--
Daniel Villeneuve
AD OPT, a Kronos Division
Configuration Information [Automatically generated, do not change]:
Machine: i686
OS: linux-gnu
Compiler: gcc
Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='i686'
-DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='i686-pc-linux-gnu'
-DCONF_VENDOR='pc'
-DLOCALEDIR='/misc/altprebuilt/prebuilt-5/i6
Configuration Information [Automatically generated, do not change]:
Machine: i686
OS: linux-gnu
Compiler: gcc
Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='i686'
-DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='i686-pc-linux-gnu'
-DCONF_VENDOR='pc'
-DLOCALEDIR='/misc/altprebuilt/prebuilt-5/i6