On 7/17/07, Paul Jarc <[EMAIL PROTECTED]> wrote:
Nevertheless, it is. The current behavior is too well-entrenched to
change it, so the most reliable way to get the behavior you want is to
skip "-e" and add "&&" between all commands.
Change the documentation to insert the bracketed sentence:
[EMAIL PROTECTED] wrote:
> My claim is that in the attached script, the 'false' command should
> *not* be considered to be a part of the && list.
Nevertheless, it is. The current behavior is too well-entrenched to
change it, so the most reliable way to get the behavior you want is
[EMAIL PROTECTED] writes:
> archive_item && delete_item
Only simple commands cause the shell to exit on error with -e. But the
commands in the function archive_item are part of a && list.
`-e'
Exit immediately if a simple command (*note Simple
Commands::) exits w
[EMAIL PROTECTED] wrote:
Script:
#! /bin/bash
set -e
archive_item()
{
set -e
false # this is the command that fails to archive the item
echo 'Archived.'
}
delete_item()
{
true
Configuration Information [Automatically generated, do not change]:
Machine: i386
OS: linux-gnu
Compiler: i386-redhat-linux-gcc
Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='i386'
-DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='i386-redhat-linux-gnu'
-DCONF_VENDOR='redhat' -DLOCALEDIR='/usr/sha